Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Creating generic debugger visualizer with C++Builder fails



Permlink Replies: 2 - Last Post: Feb 1, 2018 11:59 PM Last Post By: Johannes Weinert Threads: [ Previous | Next ]
Johannes Weinert

Posts: 90
Registered: 7/19/02
Creating generic debugger visualizer with C++Builder fails
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 1, 2018 4:09 AM
Hello,

now that C++Builder 10.2 Release 1 supports generic debugger visualizers
I wanted to test the example published by David Millington:
<https://community.embarcadero.com/blogs/entry/code-snippet-ide-debug-visualizer-plugin-for-generic-and-template-types>

Unfortunately the description to set up the visualizer seems to work for
Delphi only. We do not have a Delphi license.

I tried to create a C++Builder package and use the published Delphi
code. But I get compile errors. First it complains about a missing
"ToolsAPI" unit. If I add the ToolsAPI source path to the Delphi
settings then it complains about a missing "DockForm" unit. Obviously
adding "designide.bpi" to the requires section is not enough when the
C++Builder is used.

Then I took the example of a C++ debug visualizer published by Remy some
time ago
<https://forums.embarcadero.com/message.jspa?messageID=847286>
resp.
<http://www.codenewsfast.com/cnf/article/0/permalink.art-ng1882q4880>
and modified it to work as generic debug visualizer.

Unfortunately I can make it only compile and install but the debug
visualizer is not registered (it does not appear in the list of debug
visualizers).

I will post the package project to the attachments group. Maybe someone
can find the source of the problem. My guess is that the call of
DebuggerServices->RegisterDebugVisualizer()
in Register() does not succeed or is not executed. But I do not know how
to debug the function.

Help is much appreciated,

Regards

Hans
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Creating generic debugger visualizer with C++Builder fails
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 1, 2018 10:09 AM   in response to: Johannes Weinert in response to: Johannes Weinert
Johannes Weinert wrote:

If I add the ToolsAPI source path to the Delphi settings

Don't do that.

Obviously adding "designide.bpi" to the requires section is not
enough when the C++Builder is used.

It should be.

My guess is that the call of
DebuggerServices->RegisterDebugVisualize()
in Register() does not succeed or is not executed.

Well, did you check that?

But I do not know how to debug the function.

Debug it like you do any other function. Or, you could simply put in a
call to OutputDebugString() or MessageBox() in it.

--
Remy Lebeau (TeamB)
Johannes Weinert

Posts: 90
Registered: 7/19/02
Re: Creating generic debugger visualizer with C++Builder fails
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 1, 2018 11:59 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Am 01.02.2018 um 19:09 schrieb Remy Lebeau (TeamB):
Johannes Weinert wrote:

If I add the ToolsAPI source path to the Delphi settings

Don't do that.

Obviously adding "designide.bpi" to the requires section is not
enough when the C++Builder is used.

It should be.

It does not. Maybe it's working for Delphi packages only. Obviously the
C++Builder IDE forgets to add something important for the Delphi part...

My guess is that the call of
DebuggerServices->RegisterDebugVisualize()
in Register() does not succeed or is not executed.

Well, did you check that?

But I do not know how to debug the function.

Debug it like you do any other function. Or, you could simply put in a
call to OutputDebugString() or MessageBox() in it.

Ok, that helped. The Register() function was never called because there
was a typo in the namespace, sigh!

I will post the working example in the attachment group.

Now the true work is still to be done because the code to evaluate the
contents of the container has to be written.

Thank you for your help.

Regards

Hans
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02