mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-19 19:10:17 +00:00
update docs
This commit is contained in:
parent
b6a6aa85a6
commit
8598b44bee
@ -32,6 +32,8 @@ Please see https://pocketpy.dev for details and try the following resources.
|
||||
+ [Live Python Demo](https://pocketpy.dev/static/web/): Run Python code in your browser
|
||||
+ [Live C Examples](https://pocketpy.github.io/examples/): Explore C-APIs in your browser
|
||||
+ [Godot Extension](https://github.com/pocketpy/godot-pocketpy): Use pocketpy in Godot Engine
|
||||
+ [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=pocketpy.pocketpy): Debug and profile pocketpy scripts in VSCode
|
||||
+ [Flutter Plugin](https://pub.dev/packages/pocketpy): Use pocketpy in Flutter apps
|
||||
|
||||
## Supported Platforms
|
||||
|
||||
|
@ -1,24 +1,11 @@
|
||||
---
|
||||
icon: dot
|
||||
title: Debugging
|
||||
order: 80
|
||||
---
|
||||
|
||||
!!!
|
||||
This feature is not available in `v2.0` yet.
|
||||
!!!
|
||||
## VSCode Extension
|
||||
|
||||
You can invoke `breakpoint()` in your python code to start a PDB-like session.
|
||||
You can install our VSCode extension to debug pocketpy scripts.
|
||||
|
||||
The following commands are supported:
|
||||
|
||||
+ `h, help`: show this help message
|
||||
+ `q, quit`: exit the debugger
|
||||
+ `n, next`: execute next line
|
||||
+ `s, step`: step into
|
||||
+ `w, where`: show current stack frame
|
||||
+ `c, continue`: continue execution
|
||||
+ `a, args`: show local variables
|
||||
+ `l, list`: show lines around current line
|
||||
+ `ll, longlist`: show all lines
|
||||
+ `p, print <expr>`: evaluate expression
|
||||
+ `!, execute statement`: execute statement
|
||||
https://marketplace.visualstudio.com/items?itemName=pocketpy.pocketpy
|
||||
|
23
docs/features/profiling.md
Normal file
23
docs/features/profiling.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
icon: dot
|
||||
title: Profiling
|
||||
order: 79
|
||||
---
|
||||
|
||||
To profile your pocketpy scripts, you can run `main.exe` with `--profile` flag.
|
||||
|
||||
For example, to profile `test/test_math.py`, run
|
||||
|
||||
```
|
||||
main.exe --profile test/test_math.py
|
||||
```
|
||||
|
||||
This will output a JSON report file named `profile_report.json` in the current directory,
|
||||
which records the time spent for each line. To visualize the report, please install our VSCode extension.
|
||||
|
||||
https://marketplace.visualstudio.com/items?itemName=pocketpy.pocketpy
|
||||
|
||||
With pocketpy VSCode extension, press `F1` and type `pocketpy: Load Line Profiler Report`,
|
||||
select `profile_report.json` and you will see a nice visualization of the profiling result.
|
||||
|
||||

|
@ -13,6 +13,7 @@ Developers are able to write Python bindings via C-API or pybind11 compatible in
|
||||
+ [Live Python Demo](https://pocketpy.dev/static/web/): Run Python code in your browser
|
||||
+ [Live C Examples](https://pocketpy.github.io/examples/): Explore C-APIs in your browser
|
||||
+ [Godot Extension](https://github.com/pocketpy/godot-pocketpy): Use pocketpy in Godot Engine
|
||||
+ [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=pocketpy.pocketpy): Debug and profile pocketpy scripts in VSCode
|
||||
+ [Flutter Plugin](https://pub.dev/packages/pocketpy): Use pocketpy in Flutter apps
|
||||
|
||||
## What it looks like
|
||||
|
BIN
docs/static/profiler_demo.png
vendored
Normal file
BIN
docs/static/profiler_demo.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 518 KiB |
Loading…
x
Reference in New Issue
Block a user