- fix: Should cd to working directory when debugging.

This commit is contained in:
Roy Qu 2023-10-23 10:33:16 +08:00
parent cdb0197aea
commit 7b9c5b378a
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,8 @@ Red Panda C++ Version 2.26
- enhancement: Code suggestions for namespace alias.
- fix: Correctly handle statements like 'using xxx::operator()'.
- fix: Link in the project options dialog / precompiled header pages is not clickable.
- change: Don't change caret position when ctrl+click.
- fix: Should cd to working directory when debugging.
Red Panda C++ Version 2.25

View File

@ -2496,7 +2496,7 @@ void MainWindow::debug()
mDebugger->sendCommand("-gdb-set", "print null-stop");
mDebugger->sendCommand("-gdb-set", QString("print elements %1").arg(pSettings->debugger().arrayElements())); // limit array elements to 30
mDebugger->sendCommand("-gdb-set", QString("print characters %1").arg(pSettings->debugger().characters())); // limit array elements to 300
//mDebugger->sendCommand("-environment-cd", QString("\"%1\"").arg(extractFileDir(filePath))); // restore working directory
mDebugger->sendCommand("-environment-cd", QString("\"%1\"").arg(extractFileDir(filePath))); // restore working directory
if (pSettings->debugger().useGDBServer()) {
mDebugger->sendCommand("-target-select",QString("remote localhost:%1").arg(pSettings->debugger().GDBServerPort()));
if (!debugInferiorhasBreakpoint() || !debugEnabled) {