koopjs / koop-cli

CLI tool to build Koop applications and plugins
Other
11 stars 6 forks source link

Debug with visual studio #38

Closed hhkaos closed 4 years ago

hhkaos commented 4 years ago

@haoliangyu how do you setup Visual Studio or use node --inspect --debug-brk when debugging a new provider? I'm running koop serve but I don't know how to debug it.

Thanks!

haoliangyu commented 4 years ago

This is not available now. It is simply running node src/index.js and does not inject parameters (see https://github.com/koopjs/koop-cli/blob/master/src/utils/serve/index.js#L13). It can be a next feature.

hhkaos commented 4 years ago

I agree, actually I think it is very important if we want to build a community around Koop, first of all we need to take care of the developer experience: good documentation and developer tools should come first, right? With the new documentation page and koop-cli we are in the right track! :+1: I will continue spreading the word about Koop :)

haoliangyu commented 4 years ago

@hhkaos I have released a new version (v0.6.0). Now you can use koop serve --debug to enable the nodejs inspector. It uses the default hostname and port. This works with Chrome DevTool.

hhkaos commented 4 years ago

Awesome!! thx! I'll try it asap :heart_eyes: