diff --git a/NEWS.md b/NEWS.md index 4c0eaf76..edaf3d0c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -21,6 +21,7 @@ Red Panda C++ Version 0.13.2 - fix: project's type setting won't be saved - fix: If project's compiler set is not the same with the default compiler set, auto openned project's file will use wrong compiler set to do syntax check. - fix: open a project file through "File"->"Open" will not correctly connect it with the project internally + - fix: wrong project program directory parameter is sent to the debugger Red Panda C++ Version 0.13.1 - enhancement: suppoort localization info in project templates diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 52ef3850..647c7d05 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -1697,7 +1697,7 @@ void MainWindow::debug() mDebugger->sendCommand("-gdb-set", "confirm off"); mDebugger->sendCommand("-gdb-set", "print repeats 0"); // don't repeat elements mDebugger->sendCommand("-gdb-set", "print elements 0"); // don't limit elements - mDebugger->sendCommand("-environment-cd", excludeTrailingPathDelimiter(debugFile.path())); // restore working directory + mDebugger->sendCommand("-environment-cd", QString("\"%1\"").arg(excludeTrailingPathDelimiter(filePath))); // restore working directory if (pSettings->debugger().useGDBServer()) { mDebugger->sendCommand("-target-select",QString("remote localhost:%1").arg(pSettings->debugger().GDBServerPort())); if (!debugInferiorhasBreakpoint()) {