You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to setup a debug enviroment for VSCode via launch or inspect and I'm not be able to link it with remark cli. Even with breakpoints at plugin code, debugger doesn't stop. Code is a fresh copy downloaded from a repo with some console.log.
I'd also probed nodemon like in other web projects I have, configuring in package.json a new npm task to launch plugin script, but without success too. If I points debugger to addon code directly it works, but through client doesn't.
What I have to do at config level to get it work well both together? I'm a bit newbie and I'd never debugged in this kind of cli enviroments. Also I don't know if something extra is needed.
Here the attempt .vscode\launch.json I'm using:
{// 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": [{"name": "Launch Remark via Nodemon",// Launch Node.js"type": "node","request": "launch",// Node.js - Nodemon"runtimeExecutable": "nodemon",// "runtimeExecutable": "${workspaceFolder}${pathSeparator}node_modules${pathSeparator}.bin${pathSeparator}nodemon","runtimeArgs": ["--watch","${workspaceFolder}","--ext","js,json,md","--",// "${workspaceFolder}${pathSeparator}node_modules${pathSeparator}.bin${pathSeparator}remark","${workspaceFolder}${pathSeparator}node_modules${pathSeparator}remark-cli${pathSeparator}cli.js",],// parameters passed to remark-cli"args": [".","--watch"],// "cwd": "${workspaceFolder}",// Allows Nodemon control/access terminal lifecycle"console": "integratedTerminal","timeout": 10000,"restart": true,// An array of file or folder names, or path globs, to skip when debugging."skipFiles": ["<node_internals>/**"],// If source maps are enabled, these glob patterns specify the generated JavaScript files.// If a pattern starts with `!` the files are excluded.// If not specified, the generated code is expected in the same directory as its source."outFiles": ["${workspaceFolder}/**/*.js","!**/node_modules/**","node_modules/remark/**/*.js","node_modules/remark-*/**/*.js"],// A list of minimatch patterns for locations (folders and URLs) in which source maps can be used to resolve local files.// This can be used to avoid incorrectly breaking in external source mapped code.// Patterns can be prefixed with "!" to exclude them. May be set to an empty array or null to avoid restriction."resolveSourceMapLocations": ["dist/**/*.js","lib/**/*.js","node_modules/remark/**/*.js","node_modules/remark-*/**/*.js"]}]}
Or as npm task in package.json:
"scripts": {
"debug": "nodemon --watch ./ --ext js,json,md --exec npm run build --",
"build-md": "remark . -qfo",
"build-lib": "babel lib -d dist",
"build": "npm run build-md && npm run build-lib",
"lint": "eslint .",
"test-api": "node test",
"test": "npm run build && npm run lint && npm run test-api"
},
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello team
I'm a bit stucked.
I'm trying to setup a debug enviroment for VSCode via
launch
orinspect
and I'm not be able to link it withremark cli
. Even with breakpoints at plugin code, debugger doesn't stop. Code is a fresh copy downloaded from a repo with someconsole.log
.I'd also probed
nodemon
like in other web projects I have, configuring inpackage.json
a newnpm
task to launch plugin script, but without success too. If I points debugger to addon code directly it works, but through client doesn't.I'm following this tutorial: https://code.visualstudio.com/docs/nodejs/nodejs-debugging
What I have to do at config level to get it work well both together? I'm a bit newbie and I'd never debugged in this kind of cli enviroments. Also I don't know if something extra is needed.
Here the attempt
.vscode\launch.json
I'm using:Or as npm task in
package.json
:If someone could help me, I'll be a bit happier 😀
Thanks in advance. 🙏
Beta Was this translation helpful? Give feedback.
All reactions