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

114 lines
2.6 KiB
Markdown
Raw Normal View History

2024-03-06 19:11:08 +00:00
# RetroDECK Debug Mode
2024-03-06 20:32:35 +00:00
## RetroDECK in 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-07 06:16:06 +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:55:16 +00:00
## Run a component with a specific game or content
2024-03-06 19:11:08 +00:00
2024-03-07 06:16:06 +00:00
The easiest way is to run:
```
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.
2024-03-07 06:19:00 +00:00
ES-DE will spit out two important values `Raw emulator launch command` & `Expanded emulator launch command`.
2024-03-06 20:15:38 +00:00
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:
2024-03-07 06:16:06 +00:00
```
2024-03-07 06:23:17 +00:00
Raw emulator launch command:
Debug:
%EMULATOR_RETROARCH% -L %CORE_RETROARCH%/cap32_libretro.so %ROM%
2024-03-07 06:16:06 +00:00
```
2024-03-06 20:15:38 +00:00
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:
2024-03-07 06:16:06 +00:00
```
2024-03-07 06:23:17 +00:00
Expanded emulator launch command:
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-07 06:16:06 +00:00
```
2024-03-06 20:15:38 +00:00
2024-03-10 18:40:42 +00:00
### Deeper per game / content debugging
2024-03-06 20:15:38 +00:00
2024-03-07 06:17:43 +00:00
If we want to debug a game or content copy and run the full `Expanded emulator launch command` from above.
2024-03-06 20:15:38 +00:00
Example debugging of Dank Rider:
2024-03-07 06:16:06 +00:00
```
/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:15:38 +00:00
This will give you the raw RetroArch output.