Skip to content

Commit

Permalink
Feat:xmake-io#276 add dll debug support
Browse files Browse the repository at this point in the history
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,
        }
    ]
}
  • Loading branch information
冯金福 committed Dec 20, 2024
1 parent 30048e9 commit a26299f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/launchDebugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!');
Expand Down

0 comments on commit a26299f

Please sign in to comment.