mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
add minimal VS Code project config (#2393)
* add minimal VSCode project config * update docs * add extension recommendations Co-authored-by: Itay Cohen <itaycohen23@gmail.com>
This commit is contained in:
parent
05af1c6404
commit
abe43262c2
4
.gitignore
vendored
4
.gitignore
vendored
@ -75,7 +75,9 @@ compile_commands.json
|
||||
docs/source/_build
|
||||
|
||||
# vscode
|
||||
**/.vscode
|
||||
/.vscode/*
|
||||
!/.vscode/settings.json
|
||||
!/.vscode/extensions.json
|
||||
|
||||
# Visual Studio CMake
|
||||
src/out
|
||||
|
7
.vscode/extensions.json
vendored
Normal file
7
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"ms-vscode.cpptools",
|
||||
"ms-vscode.cmake-tools",
|
||||
"twxs.cmake"
|
||||
]
|
||||
}
|
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cmake.sourceDirectory": "${workspaceFolder}/src",
|
||||
"cmake.configureSettings": {
|
||||
"CUTTER_USE_BUNDLED_RADARE2": "ON"
|
||||
}
|
||||
}
|
@ -86,23 +86,24 @@ Recommended plugins
|
||||
|
||||
Project setup
|
||||
~~~~~~~~~~~~~
|
||||
- :menuselection:`File --> Open Folder` select the folder in which you cloned Cutter
|
||||
- If the recommend plugins are already installed, in the corner you will see a popup asking you "Would you like to configure project 'cutter'? Source: CMake Tools (Extension)". Click Yes.
|
||||
- If you initially dismissed the configuration window or didn't have the plugins installed yet - open command pallet using :kbd:`Ctrl-Shift-P` and select :guilabel:`Cmake: Configure`
|
||||
- In the kit selection choose :guilabel:`[Unspecified]` unless you have more specific needs.
|
||||
- If you see the following error: "CMakeList.txt was not found in the root of folder cutter", choose :guilabel:`Locate` and specify the path to :file:`cutter/src/CMakeLists.txt`
|
||||
- :kbd:`Ctrl-Shift-P`/:guilabel:`CMake: Edit CMake Cache`, find the line ``CUTTER_USE_BUNDLED_RADARE2:BOOL=OFF`` and change it to ON.
|
||||
- :menuselection:`File --> Open Folder...` and select the folder in which you cloned Cutter
|
||||
- Install the recommended plugins.
|
||||
- Once the `CMake Tools` plugin is installed, in the corner you will see a popup asking you "Would you like to configure project 'cutter'? Source: CMake Tools (Extension)". Click Yes.
|
||||
- In the kit selection popup, choose :guilabel:`[Unspecified]` unless you have more specific needs.
|
||||
- If you initially dismissed the configuration window or didn't have the plugins installed yet - open command-palette using :kbd:`Ctrl-Shift-P` and select :guilabel:`Cmake: Configure`
|
||||
|
||||
Changing CMake configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
After the first configuration :kbd:`Ctrl-Shift-P`/:guilabel:`CMake: Edit CMake Cache` opens a text editor with all CMake options. Cutter specific ones mostly start with "CUTTER".
|
||||
|
||||
.. note::
|
||||
``CUTTER_USE_BUNDLED_RADARE2`` option is also defined in ``.vscode/settings.json`` file and it will be overridden from there. It is set to ``ON`` by default as it is recommended during development.
|
||||
|
||||
.. _vscode-debug-setup:
|
||||
|
||||
Building, Running, Debugging
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Build and running commands are available in the bar at the bottom left and in the Command Palette menu (:kbd:`Ctrl-Shift-P`) named ``CMake: Build F7``, ``CMake: Run Without Debugging Shift+F5``, and ``CMake Debug Ctrl + F5``.
|
||||
Build and running commands are available in the status bar at the bottom and in the Command Palette menu (:kbd:`Ctrl-Shift-P`) named ``CMake: Build F7``, ``CMake: Run Without Debugging Shift+F5``, and ``CMake Debug Ctrl + F5``.
|
||||
Shortcuts can be viewed in the :kbd:`Ctrl-Shift-P` menu. They don't match default VS Code ones since those depend on :file:`tasks.json``.
|
||||
|
||||
Running and debugging launches the executable without any arguments. Command-line arguments can be passed to the debug
|
||||
|
Loading…
Reference in New Issue
Block a user