Wiki/wiki-rtd/docs/wiki_development/general/debug-mode.md

98 lines
2.4 KiB
Markdown
Raw Normal View History

2024-03-06 19:11:08 +00:00
# RetroDECK Debug Mode
2024-03-06 20:24:36 +00:00
You can use the flatpak shell for debugging from bash by using the following command:
2024-03-06 19:11:08 +00:00
```
flatpak run --command=bash net.retrodeck.retrodeck
```
NOTE: on wayland in some cases it's needed to enter with the command above otherwise some emulators will not run:
2024-03-06 20:24:36 +00:00
2024-03-06 19:11:08 +00:00
```
flatpak run --command=sh --nosocket=fallback-x11 --socket=x11 net.retrodeck.retrodeck
```
2024-03-06 20:30:26 +00:00
This is can be used as a `RetroDECK Debug Mode`.
2024-03-06 20:24:36 +00:00
2024-03-06 20:32:11 +00:00
---
2024-03-06 20:30:26 +00:00
## Launch ES-DE in Debug Mode:
From the RetroDECK Debug Mode use the following command to open ES-DE in Debug Mode.
2024-03-06 19:11:08 +00:00
2024-03-06 19:19:05 +00:00
`es-de --debug --home /var/config/`
2024-03-06 19:11:08 +00:00
2024-03-06 20:32:11 +00:00
---
2024-03-06 19:11:08 +00:00
2024-03-06 20:30:26 +00:00
## List runnable components in Debug Mode
RetroDECK consists of a variety of features all called components.
These consists of emulators, game engines, other software or functions.
2024-03-06 19:11:08 +00:00
2024-03-06 20:30:26 +00:00
You can list all the available components via the command:
2024-03-06 19:11:08 +00:00
```
ls /app/bin
```
2024-03-06 20:32:11 +00:00
---
2024-03-06 19:11:08 +00:00
### How to run a component?
Just type the compoants name directly into the flatpak shell CLI.
Example:
- `retrodeck` launches full RetroDECK.
You can also launch specific components by running them, example:
- `retroarch` launches RetroArch.
This is useful when for example a game is not starting and you want the output printed in the terminal.
2024-03-06 20:32:11 +00:00
---
2024-03-06 20:30:26 +00:00
## Run a component with a specific game or content for debugging
2024-03-06 19:11:08 +00:00
2024-03-06 20:15:38 +00:00
The easiest way is to run the `es-de --debug --home /var/config/`
2024-03-06 19:11:08 +00:00
2024-03-06 20:15:38 +00:00
Then start or try to start the game or content you want to debug.
ES-DE will spit out two important values.
2024-03-06 20:32:11 +00:00
---
2024-03-06 20:30:26 +00:00
### Raw emulator launch command
2024-03-06 20:15:38 +00:00
This tell you the dynamic pathing to the core file + rom file.
Example output of amstrad game being launch via the RetroArch core:
`Debug: %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/cap32_libretro.so %ROM%`
This tells that the Emulator that is launched is retroarch and the core is cap32 via the selected `%ROM%`
2024-03-06 20:32:11 +00:00
---
2024-03-06 20:30:26 +00:00
### Expanded emulator launch command:
2024-03-06 20:15:38 +00:00
This is the fullcommand to launch the file
Example output of the game above, a game called Dank Rider:
`Info: /app/bin/retroarch -L /app/share/libretro/cores/cap32_libretro.so /home/deck/retrodeck/roms/amstradcpc/1001\ BC\ (1984)(Dank Rider)(fr).zip`
2024-03-06 20:32:11 +00:00
---
2024-03-06 20:30:26 +00:00
#### Use the expanded command for deeper debugging
2024-03-06 20:15:38 +00:00
If we want to debug a game or content copy and run the full `Expanded emulator launch command`
Example debugging of Dank Rider:
`/app/bin/retroarch -L /app/share/libretro/cores/cap32_libretro.so /home/deck/retrodeck/roms/amstradcpc/1001\ BC\ (1984)(Dank Rider)(fr).zip`
This will give you the raw RetroArch output.