lite-server icon indicating copy to clipboard operation
lite-server copied to clipboard

story for launching lite-server as part of visual studio code launch.json settings

Open myusrn opened this issue 10 years ago • 2 comments

love the lite-server story especially as outlined for use in https://angular.io/docs/ts/latest/quickstart.html and related ng2 getting started tutorials.

was wondering if you'd arrived at a way to enable it to be run as part of visual studio code debugger rather than requiring me to drop out to a command prompt and execute "npm start" alias and then resort to browser f12 tools for debugging?

was trying to vet that option in https://github.com/myusrn/vscng2qs but seems like it only wants to launch node.js server apps and not lite-server npm package.

myusrn avatar Jan 31 '16 22:01 myusrn

@myusrn I was able to hack together a working launch.json to use lite-server for VS Code. Check it out here: https://github.com/josiahpeters/vscode-angular-starter/blob/master/.vscode/launch.json#L8

josiahpeters avatar Mar 05 '16 23:03 josiahpeters

hi @josia thanks for the followup on this.

i tested adding that to my vscode launch.json [ https://github.com/myusrn/vscng2qs/blob/master/.vscode/launch.json ] and it did allow me to successfully launch lite-server hosted instance of ng2 app from vscode ide debug UI. note that that I was in the process of updating my vscode authoring enabled ng2 tutorial based sources to new ng2.0.0-beta.8 based package and associated dependencies one of which was lite-server moving to ^2.1.0 version. It appears you now have to create and us a bs-config.json file to control lite-server port number.

i wasn't able to get vscode debug launched instance of lite-server hosted ng2 app to stop on soft break points and likewise with attach option. wondering if there is some setting beyond tsconfig.json | "sourceMap": true and .vscode/launch.json | "sourceMaps": true that one needs to set to make that work

myusrn avatar Mar 07 '16 22:03 myusrn