Use case: I need to debug my karma tests
- I created a new node project
- I added a dependency on karma
- I added a few tests
- I went to the project properties and set:
Node.exe arguments: karma
Script.exe arguments: start
Launch url: http://localhost:9876/
- I hit F5
Error: No startup file is defined for the startup project.
My workaround:
- I added a start-karma.js to my project. It's a one liner:
require('./node_modules/karma/lib/cli.js').run();
- I made start-karma.js the startup script
- I went to the project properties and set:
Node.exe arguments: <<empty>>
Script.exe arguments: start
Launch url: http://localhost:9876/
- I hit F5 and voila.
It would be better (and easier to figure out) if I did not have to use this workaround.
Comments: I managed to configure the project to start with the karma configuration file without using the "start-karma.js". To do that I manually modified the Node.Js project properties from the Visual Studio Solution Explorer. This is how my project properties look now:  You can find the project that I am working with in this branch: https://github.com/popalexandruvasile/rentthatbike/tree/chapter5-example1
- I created a new node project
- I added a dependency on karma
- I added a few tests
- I went to the project properties and set:
Node.exe arguments: karma
Script.exe arguments: start
Launch url: http://localhost:9876/
- I hit F5
Error: No startup file is defined for the startup project.
My workaround:
- I added a start-karma.js to my project. It's a one liner:
require('./node_modules/karma/lib/cli.js').run();
- I made start-karma.js the startup script
- I went to the project properties and set:
Node.exe arguments: <<empty>>
Script.exe arguments: start
Launch url: http://localhost:9876/
- I hit F5 and voila.
It would be better (and easier to figure out) if I did not have to use this workaround.
Comments: I managed to configure the project to start with the karma configuration file without using the "start-karma.js". To do that I manually modified the Node.Js project properties from the Visual Studio Solution Explorer. This is how my project properties look now:  You can find the project that I am working with in this branch: https://github.com/popalexandruvasile/rentthatbike/tree/chapter5-example1