Press F5 to start run your app without a debugger attached.īoth launch configurations will launch the currently selected CMake launch target. If you want to run the app without a debugger attached, select the DOS run target launch configuration in the Run and Debug panel.Īlso make sure you have the CMake Release variant selected, which you can accomplish via the status bar at the bottom of VS Code. Note: you can not set breakpoints while the app is running. The debugger will stop at the statement after the call to gdb_checkpoint(). If your app is running, you can interrupt it at any point using the Pause button of the debugger controls. You can set breakpoints, step, continue, and inspect local variables as usual. The debugger will stop at the statement after the call to gdb_start(). To debug your app, select the DOS debug target configuration in the Run and Debug panel.Īlso make sure you have the CMake Debug variant selected, which you can accomplish via the status bar at the bottom of VS Code. The project template provides two launch configurations: In general, you do not have to touch them. vscode/ folder contains various configuration files, defining launch configurations, sensible settings for C/C++ development, and so on. To provide maximum compatibility, stick to the 8.3 file name format for your assets and executable files. Note that in general, DOS only supports 8.3 file names. The CMake build will copy these next to your app's executable. The assets/ folder is where you play your asset files, e.g. The CMake build will automatically pick up any new source files in the src/ folder or sub-folders of src/. main.c, a simple demo app that sets mode 0x13, draws random pixels, and waits for a key press to exit.gdbstub.h, a GDB stub implementation as a head-only library file you can include in your app to support debugging.The src/ folder contains the sources of your app. CMakeLists.txt, the CMake build definition.gitignore, to exclude folders that should not get commited to your Git repository. vscode/settings.json file configures formatting on save. clang-format, a format definition used to format your. The command will generate a project looking like this: Select Yes.įinally, you may be asked if you want to "Configure" the project. The first time you run this command in VS Code, you will be asked if you want to install the development tools if they are not yet installed. They can then be used by all your DOS projects. This will download DJGPP, GDB, DOSBox-x, Ninja, a DOSBox-x configuration file for debugging, and a CMake toolchain file for DJGPP to the folder $HOME/.dos. Ubuntu/Debian: sudo apt install libncurses5 libfl-dev libslirp-dev libfluidsynth-devĮverything else is taken care of by the automatic tools installation.On Linux, install libncurses5 libfl-dev libslirp-dev libfluidsynth-dev via your package manager.macOS: use Homebrew, brew install cmake.Windows: use the installer from the CMake download page.Ensure it's available on the command line via your PATH environment variable. You need to install the following 3rd party software: Press F5 to build and debug the demo app in DOSBox-x.When asked to install clangd, select Yes.When asked to install the DOS tools, select Yes. Libncurses5 libfl-dev libslirp-dev libfluidsynth-dev On Linux, install these packages through your package manager
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |