Browse Source

Feat:#276 add dll debug support (#283)

Detail:if target is a program full path,pass it.
so with the user debug configuration as follows, user can debug dll which
the target exe load.
{
    "version": "0.2.0",
    "configurations": [

        {
            "type": "xmake",
            "request": "launch",
            "name": "launch exe to debug dll",
            "target": "D:\\xxx.exe",
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
        }
    ]
}

Co-authored-by: 冯金福 <[email protected]>
fengjinfuyl 1 year ago
parent
commit
1cdc2a6132
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/launchDebugger.ts

+ 6 - 0
src/launchDebugger.ts

@@ -172,6 +172,12 @@ class XmakeConfigurationProvider implements vscode.DebugConfigurationProvider {
 
         const targetInformations = await getInformations(config.target);
 
+        // if target is a program full path,pass it.
+        if (fs.existsSync(config.target))
+        {
+            targetInformations.path = config.target;
+        }
+
         // Set the program path
         if (!(targetInformations.path && fs.existsSync(targetInformations.path))) {
             await vscode.window.showErrorMessage('The target program not found!');