I'm trying to debug a yeoman generator in visual studio code but it keeps telling me that it cannot launch programm d:\repos\generator\node_modules\.bin\yo'; enabling source maps might help
everytime I hit F5
My VS Code config File looks like this:
{
"version": "0.1.0",
"configurations": [
{
// Name of configuration; appears in the launch configuration drop down menu.
"name": "Launch app/index.js",
// Type of configuration. Possible values: "node", "mono".
"type": "node",
// Workspace relative or absolute path to the program.
"program": "node_modules/.bin/yo",
// Command line arguments passed to the program.
"args": [ "design" ],
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
"cwd": ".",
// Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
"runtimeExecutable": null,
// Optional arguments passed to the runtime executable.
"runtimeArgs": ["--nolazy"],
// Environment variables passed to the program.
"env": {
"NODE_ENV": "development"
},
// Use JavaScript source maps (if they exist).
"sourceMaps": false,
// If JavaScript source maps are enabled, the generated code is expected in this directory.
"outDir": null
}
]
}
And my package.json something like this:
{
"name": "generator-design",
"version": "0.1.0",
"main": "app/index.js",
"files": [
"generators/app"
],
"dependencies": {
"yeoman-generator": "^0.20.3",
"yosay": "^1.0.5",
"chalk": "^1.1.1",
"uuid": "^2.0.1",
"yeoman-option-or-prompt": "^1.0.2"
}
}
The path is correct and yeoman is working, because when I copy it to the command line yeoman greets me and asks which generator I would like to run. Also the generator works fine if I select it.
- VS Code Version is
0.9.2
- OS is Windows
8.1
- Yeoman ist
latest
What am I missing here?
not sure if this is relevant, but when I add .js to the yo file VS Code starts up the console (where it fails of course, but atleast the console starts)
and if I point the path to something wrong, the error message changes to program 'd:\foo\bar\yo' does not exist