Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc issue: launch.json "outFiles" isn't documented #69161

Closed
diberry opened this issue Feb 21, 2019 · 4 comments
Closed

Doc issue: launch.json "outFiles" isn't documented #69161

diberry opened this issue Feb 21, 2019 · 4 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@diberry
Copy link

diberry commented Feb 21, 2019

While trying to debug a node.js project on Win10 that uses a Makefile, the launch.json looks like:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Makefile Debug",
            "program": "C:\\ProgramData\\chocolatey\\bin\\make.exe",
            "args": ["test"],
            "cwd": "${workspaceFolder}"
        }
    ]
}

The error is Cannot launch program 'C:\ProgramData\chocolatey\bin\make.exe; setting the 'outFiles' attribute might help.

This is where I'm looking for outFiles but can't find it.

@weinand
Copy link
Contributor

weinand commented Feb 21, 2019

@diberry you tried to find "outFiles" in the generic debug documentation. But you are using the Node.js debugger so it would make more sense to look into the specific "Node.js Debugging" documentation: https://code.visualstudio.com/docs/nodejs/nodejs-debugging and specifically the attribute "outFiles": https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_source-maps.

So "outFiles" is documented, but it does not really help in your case. You tried to debug a "*.exe" file with the Node.js debugger. But a *.exe is not a source file that Node.js understands.

What are you trying to do?

@weinand weinand added the info-needed Issue requires more information from poster label Feb 21, 2019
@diberry
Copy link
Author

diberry commented Feb 21, 2019

I'm trying to add a unit test to js-yaml which is built and run tests from Makefile. I've done a lot of debugging with VSCode for Node, .Net but not with a Makefile so that part is new to me.

I'm trying to figure out how to construct the launch file to run the mocha test (controlled by Makefile), so I can have the breakpoints hit.

I've looked for any example of a launch file that uses a Makefile but can't google my way to an answer.

@weinand
Copy link
Contributor

weinand commented Feb 21, 2019

Use the "runtimeExecutable" and "runtimeArgs" if you want to run arbitrary programs with the node debugger. See https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_launch-configuration-support-for-npm-and-other-tools

@weinand weinand closed this as completed Feb 21, 2019
@weinand weinand added *question Issue represents a question, should be posted to StackOverflow (VS Code) and removed info-needed Issue requires more information from poster labels Feb 21, 2019
@diberry
Copy link
Author

diberry commented Feb 22, 2019

@weinand I see you closed this bug. I'm adding info in case someone else stumbles across it.

I didn't get this to work with a Makefile on Windows 10 or on Mac. I did wind up using the NPM launch, as noted in this StackOverflow issue.

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants