8/26/2023 0 Comments Js script debuggerI’d be happy to help and review the PRs and answer the issues.JS Tutorial JS HOME JS Introduction JS Where To JS Output JS Statements JS Syntax JS Comments JS Variables JS Let JS Const JS Operators JS Arithmetic JS Assignment JS Data Types JS Functions JS Objects JS Events JS Strings JS String Methods JS String Search JS String Templates JS Numbers JS BigInt JS Number Methods JS Number Properties JS Arrays JS Array Methods JS Array Sort JS Array Iteration JS Array Const JS Dates JS Date Formats JS Date Get Methods JS Date Set Methods JS Math JS Random JS Booleans JS Comparisons JS If Else JS Switch JS Loop For JS Loop For In JS Loop For Of JS Loop While JS Break JS Iterables JS Sets JS Maps JS Typeof JS Type Conversion JS Bitwise JS RegExp JS Precedence JS Errors JS Scope JS Hoisting JS Strict Mode JS this Keyword JS Arrow Function JS Classes JS Modules JS JSON JS Debugging JS Style Guide JS Best Practices JS Mistakes JS Performance JS Reserved Words So, if you are interested in the debugger, please help test and improve/develop it. I created a stub/skeleton for the DAP server here.Īside from and I, a lot of people helped make this possible, notably Niels Widger for testing and suggestions and recently Zhongxian Pan who contributed code and filed lots of issues and PRs. Finally the DAP needs to be implemented as another frontend for the debugger. There is still road ahead for the debugger to be improved and possibly merged in Goja. You can also have a look at the tests and I wrote for the debugger implementation in helped improve the code a lot after my initial POC and also created a POC debugger frontend with 1 VU inside k6 to show how the debugger works, which you can compile and test. Also, there has been lots of discussions around it and I also filed a PR for review. This new debugger has the basic functionalities needed for the Goja to be able to debug a JS script, as mentioned here. I created a CLI frontend application, Goja Debugger, to demonstrate the capabilities of the new debugger. DetailsĪ while ago I started experimenting with Goja, the underlying JS engine of k6 and DAP, LSP and LSIF on VS Code and I was convinced back then that the only way to debug k6 code is to implement a debugger in Goja, which was exactly what I did, although with its own limits and shortcomings. There is a POC debugger for k6 that is not merged into Goja yet. Also this will be a lot of work.Īre you doing something complex enough that console.log won’t help you? As this is the only "debugger’ currently and given my reasoning above, it is unlikely to change … soon. The implementation won’t be exactly the same so there will be subtle differences which means that if you are debugging something complex you might get different behaviour. There have been people who wanted to use their (request making) nodejs code to be run in k6, but if they use these modules in nodejs … it will also work in k6. we can reimplement the k6 modules for nodejs so you can debug them.k6 can get a debugger … I have no idea what this will entail, but it will probably be a lot of work and is likely to not be compatible with anything else, which will practically negate the majority of the benefits.The error you see is because it tries to run it in nodejs and “k6” is not a module nodejs recognises. So there is no way for visual studio code to debug k6 scripts. K6 is not nodejs based and also has no debugger of its own.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |