Fix DAP path mismatch on Windows
This commit is contained in:
parent
cfab3d2f57
commit
b8ae1c218c
2 changed files with 12 additions and 0 deletions
|
|
@ -341,6 +341,12 @@ Dictionary DebugAdapterParser::req_setBreakpoints(const Dictionary &p_params) co
|
|||
return prepare_error_response(p_params, DAP::ErrorType::WRONG_PATH, variables);
|
||||
}
|
||||
|
||||
// If path contains \, it's a Windows path, so we need to convert it to /, and make the drive letter uppercase
|
||||
if (source.path.find("\\") != -1) {
|
||||
source.path = source.path.replace("\\", "/");
|
||||
source.path = source.path.substr(0, 1).to_upper() + source.path.substr(1);
|
||||
}
|
||||
|
||||
Array breakpoints = args["breakpoints"], lines;
|
||||
for (int i = 0; i < breakpoints.size(); i++) {
|
||||
DAP::SourceBreakpoint breakpoint;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue