hello dear
i need to debug orthancserver with my new plugin how is it possible?
is there a way to debug it with docker?
thanks
hello dear
i need to debug orthancserver with my new plugin how is it possible?
is there a way to debug it with docker?
thanks
Hi, Sayyed!
You can certainly debug it with docker. In our company’s project we do it.
The only catch is that you find a suitable “base docker image”. What I mean by that is this image will be a starting point. And because it’s based off of a Linux Distribution, you might run into linkage problems.
Say you’re compiling your plugin against jsoncpp 1.x.x and the base image provides jsoncpp 0.x.x, then your plugin will fail to load.
So you have two options as I see it (assuming your Linux Distro of choice is Fedora 26, aka F26):
Compile both Orthanc and your plugin on F26, then get an F26 basic image. You’ll then start your Dockerfile off of that.
Get an official image like sjodogne/Orthanc:1.3.2, start your own Dockerfile from that one and just copy your plugin into the new image. By the way, this image is based on Debian Wheezy.
All things considered, to get #2 going you’ll have to create what I like to call an ODE (Orthanc Development Environment). It takes a while to do it, but it’s worth it, IMHO.
In any case you’ll want to start Orthanc in verbose mode so it outputs more informational messages.
Hope this helps.
Have a good one!
thanks
i want to debug every line of my plugin code in gdbserver, do you have any solutions?
using verbose messages is not handfull
best regards,
You’re welcome.
I see. I’m somewhat steping on new territory here, even thought I’ve fiddled with the idea in the past.
I believe you’ll want to make sure both your version of Orthanc and your plugin have been compiled with debug symbols. Then you’ll probably want to create a custom docker with gdbserver and gdb pre-installed. Also, your development docker will probably start Orthanc through gdbserver and the apropriate ports would have to be exposed with the use of the ‘-p’ command line option.
That way, theoretically, you’ll be able to remotelly debug Orthanc as a whole which would include your plugin, line by line if you wish.
HTH