Closed plchampigny closed 5 years ago
I know it's in the README.md that you are planning this feature, but I wanted an issue for this. I don't know if this is work intensive, but we could put one of our guy on the problem and submit a PR.
That would be awesome for sure! , indeed I expect this to be a very work intensive feature.
I am planning on starting with this feature next week, I am currently working on "Cancel Current Run"(its gonna be a huge hack since Angular or Karma don't support stopping current run without killing the hole freaking test server!!!!).
"Debug Tests" feature will involve running angular and creating a debugging session to that instance of the browser( just like when you use the debugger for chrome manually), the hard part is that there will changes needed so that current execution doesn't timeout while debugging is stopped in a breakpoint( mainly in the socket connection between the explorer and the browser).
If you can wait a little more I will start with that next week, if not it would be great if you could put me in contact with that developer so we can work together on the same branch.
Again thanks for the support on this project, it means a lot to me.
Thank you for the cool extension! I want to know the status of this issue ;)
@irustm you can follow the progress on this branch.
https://github.com/Raagh/angular-karma_test-explorer/tree/feature/debug-tests?files=1
Yesterday I managed to actually run a test with a debug session and it stopped on a breakpoint. There still things to be done but I am doing some good progress :)
Just merged Debugging tests into master. Also fixed a bug were codelenses and gutter decorations did not appear on the test line when you open it.
Please submit any bug you find on debugging tests. Just one caveat, I could not find a way to stop debugging session from vscode without having to kill the entire karma instance(since execution session is actually happening in the browser and karma doesn't provide an API to do that). This means that when you debug a test, if you wanna stop debugging you need to stop the debugging session manually by clicking the stop button in vscode. I will try to find a solution for that but it doesn't seems promising.
Hope the rest works okey, I been trying it this last few days at my daily job and I am satisfied with it, hopefully you guys are too.
I also created a Documentation page that explains some configurations needed for some scenarios, and the caveats that this extension has. Please feel free to contribute :)
https://github.com/Raagh/angular-karma_test-explorer/blob/master/DOCUMENTATION.md
I cheered too soon :(. Already found some issues on very big suitrs were breakpoints seem to be moving based on the codelenses. Pretty weird behavior u.u. Please report anything you find. I will be trying a few things in the following days
Is your feature request related to a problem? Please describe. Right now the debug test feature is not implemented.
Describe the solution you'd like Be able to debug a test directly by clicking the debug button
Describe alternatives you've considered Manually do it