Update vscode debug config (#2)

This commit is contained in:
Max 2025-01-26 03:46:41 +01:00 committed by GitHub
parent 659ca2b76f
commit 37bdf7ad12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 68 additions and 6 deletions

1
.gitignore vendored
View File

@ -76,7 +76,6 @@ cmake-build-debug/
# IDE # IDE
.vs/ .vs/
.vscode/
.idea/ .idea/
.kdev/ .kdev/
.kdev4/ .kdev4/

35
.vscode/launch.json vendored Executable file
View File

@ -0,0 +1,35 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "netex server (gdbserver)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/debug/bin/netex_srv",
"args": [],
"miDebuggerServerAddress": "localhost:2345",
"miDebuggerPath": "/usr/bin/gdb",
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"preLaunchTask": "netex_srv-gdbserver",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
]
}

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"task.problemMatchers.neverPrompt": true
}

17
.vscode/tasks.json vendored Executable file
View File

@ -0,0 +1,17 @@
{
"tasks": [
{
"label": "build_start_server",
"dependsOn": [
"CMake: clean rebuild",
"netex_srv-gdbserver"
]
},
{
"type": "shell",
"label": "netex_srv-gdbserver",
"command": "setsid konsole -e 'gdbserver :2345 ${workspaceFolder}/build/debug/bin/netex_srv'"
}
],
"version": "2.0.0"
}

View File

@ -1,2 +0,0 @@
set debuginfod enabled on
set disassembly intel

View File

@ -1,11 +1,11 @@
add_executable(netex_svr add_executable(netex_srv
"main.c" "main.c"
"server.c" "server.c"
"srv_ui.c" "srv_ui.c"
"server.h") "server.h")
target_include_directories(netex_svr PRIVATE ${CMAKE_SOURCE_DIR}/src/net/include) target_include_directories(netex_srv PRIVATE ${CMAKE_SOURCE_DIR}/src/net/include)
target_link_libraries(netex_svr netex) target_link_libraries(netex_srv netex)
#add_custom_command(TARGET netex_svr POST_BUILD #add_custom_command(TARGET netex_svr POST_BUILD
# COMMAND ${CMAKE_COMMAND} -E copy # COMMAND ${CMAKE_COMMAND} -E copy

10
srv_config.json Normal file
View File

@ -0,0 +1,10 @@
{
"Connection": {
"Port": 6920,
"BindIP": "0.0.0.0",
"IPv": "Double",
"Crypto": {
"CertPath": "cert.pem"
}
}
}