You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are having trouble with the CommonJS require function, set environment variable `DEBUG='ctx-module*'`and you can see the filenames it tries to laod.
352
352
353
+
## pmdb
354
+
355
+
PythonMonkey has a built-in gdb-like JavaScript command-line debugger called **pmdb**, which would be automatically triggered on `debugger;` statements and uncaught exceptions.
356
+
357
+
To enable **pmdb**, simply call `from pythonmonkey.lib import pmdb; pmdb.enable()` before doing anything on PythonMonkey.
358
+
359
+
```py
360
+
import pythonmonkey as pm
361
+
from pythonmonkey.lib import pmdb
362
+
363
+
pmdb.enable()
364
+
365
+
pm.eval("...")
366
+
```
367
+
368
+
Run `help` command in**pmdb** to see available commands.
369
+
370
+
```console
371
+
(pmdb) >help
372
+
List of commands:
373
+
• ...
374
+
• ...
375
+
```
376
+
353
377
## pmjs
354
378
- there is a `.help` menu in the REPL
355
379
- there is a `--help` command-line option
380
+
- the `--inspect` option enables **pmdb**, a gdb-like JavaScript command-line debugger
356
381
- the `-r` option can be used to load a module before your program or the REPL runs
357
382
- the `-e` option can be used evaluate code -- e.g. define global variables -- before your program or the REPL runs
358
383
- The REPL can evaluate Python expressions, storing them in variables named `$1`, `$2`, etc.
0 commit comments