Is it possible to set up such environment (similar to a web application where we can install a web server on local system and code could be run on local server or could be debugged from an IDE).
I guess in case of OpenNebula development environment , I need to somehow connect Hypervisor , external dependencies with the editor to make code run or debug in the editor itself !
Any leads or step by step documentation for this would be really appreciated as I would be doing some source code modification for the research purpose and need to test and debug my changes live.
Some code, mostly drivers (ruby, shell), you can modify directly on the server where you install it. But if your intention is to change the oned core you would perhaps still need to compile from the source as you mentioned.
In my case, I use Virsual Studio Code and I have a launch.json file to debug the code. But I always compile the code before lauch the debugger.
launch.json
{
// 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": "OpenNebula (GDB)",
"type": "cppdbg",
"request": "launch",
"program": "$ONE_LOCATION/src/nebula/oned",
"args": ["-f"],
"stopAtEntry": false,
"cwd": "$ONE_LOCATION",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
Also, if you need to compile the code before to execute the debugger or stop one, you can create tasks in a file tasks.json and use the option preLaunchTask in your launch.json to execute these tasks.