Normally you would run hello.ls
by:
lsc hello.ls
When you want to debug, run the same file with:
./debug-ls hello.ls
...and:
If you install NiM (Node Inspection Manager) extension, there is nothing to be done manually. A debugger window will be automatically (re)launched when ./debug-ls your-file.ls
is invoked (or your-file.ls
is modified).
This approach is way more convenient during development, as explained here.
- Go to
chrome://inspect/#devices
address in Chrome - Find your process that is listed under "Remote Target" section
- Click "inspect" button
If you prefer this way, you need to close the current debugger window and repeat these steps everytime your source file is modified.
The source file is watched and re-bundled when it is or any of its dependencies are modified.
# Assuming you are in /path/to/somewhere
git clone https://github.com/ceremcem/debug-ls
cd debug-ls && npm install
npm i -g rollup # if you haven't already
Add /path/to/somewhere/debug-ls/debug-ls
in your $PATH
.
See the ./example folder.