alt:V allows you to debug your server-side code just like you would do in NodeJS.
- Enable inspector in
resource.toml
.
type = 'js'
main = 'main.js'
[inspector]
# You can also specify host and port if needed
# (127.0.0.1:9229 by default)
# host = '127.0.0.1'
# port = '9999'
- Add NodeJS interval with 0 delay.
setInterval(() => {}, 0)
-
Now you should be able to connect to inspector via Chrome DevTools for example:
- Open any webpage in Chrome
- Press f12 to open console
- Click on NodeJS icon
Video tutorial:
<iframe width="1280" height="720" src="https://www.youtube-nocookie.com/embed/F7mzNho5un8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>