Question about debugger api (com.intellij.debugger.*)

is this api generic enough to be able to wrap something like oracle debugging engine (SYS.DBMS_DEBUG)?

I plan to enhance db navigator plugin with debugging facilities. The DBMS_DEBUG utility provides support for almost all features which are available for java debugging as well (execution interruption, breakpoints, variable values)... quite impressive...

Would be nice to have this functionality embedded in the standard intellij debugging framework...

20 comments

No, but it will be in Diana (most likely in different package).

Dan Cioca wrote:

is this api generic enough to be able to wrap something like oracle debugging engine (SYS.DBMS_DEBUG)?

I plan to enhance db navigator plugin with debugging facilities. The DBMS_DEBUG utility provides support for almost all features which are available for java debugging as well (execution interruption, breakpoints, variable values)... quite impressive...

Would be nice to have this functionality embedded in the standard intellij debugging framework...


--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Great! Won't be able anyhow to provide this feature until Diana is released. Need to be able to parse PL/SQL first.
Yet, I wonder how did Sascha implement the "XSLT-Debugger". Is this all custom implementation?

0

No, it uses some of the infrastructure in IDEA to set/manage breakpoints, and a bit of black magic ;)

Sascha

0

:) Thanks for the clarification. Think i'll wait for Diana. Have already enough trouble maintaining compatibility with both 6.0 and 7.0 with the small non-open-api "black magic" i used.. ;)

0

Hi Maxim,
are there any updates on this. Is com.intellij.xdebugger.* the new package? Are there any examples of plugins already using this? I know that js debugger was developed recently, but didn't find the sources in the plugin dev kit.

0

Hello Dan,

are there any updates on this. Is com.intellij.xdebugger.* the new
package? Are there any examples of plugins already using this? I know
that js debugger was developed recently, but didn't find the sources
in the plugin dev kit.


Yes, xdebugger is the new package. None of the plugins using the new debugger
infrastructure (JS, Flex, PHP and Ruby) are currently open-source.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Ok, regarding the naming of the api is quite intuitive and straight, so it gives you a clue on what needs to be done. Still there are some things which are not obvious just by looking at the names of the interfaces, things like:
- how do I make a custom language aware that it is "debugable", i.e. the document allows setting breakpoints, it listens to breakpoint addition/removal

- how to register a new type of ProgramRunner

I guess I could find all that out by digging further but still, i would appreciate hints from people already worked on custom debug plugins

0

In order to support new type of breakpoints you need to implement com.intellij.xdebugger.breakpoints.XBreakpointType and register your implementation
as an extension point in plugin.xml. ProgramRunner should be registered in plugin.xml as well (see ProgramRunner's javadoc for details).

Ok, regarding the naming of the api is quite intuitive and straight, so it gives you a clue on what needs to be done. Still there are some things which are not obvious just by looking at the names of the interfaces, things like:
- how do I make a custom language aware that it is "debugable", i.e. the document allows setting breakpoints, it listens to breakpoint addition/removal

- how to register a new type of ProgramRunner

I guess I could find all that out by digging further but still, i would appreciate hints from people already worked on custom debug plugins

---
Original message URL: http://www.jetbrains.net/devnet/message/5243857#5243857



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Hello Nikolay,

thanks for the helpful hints. I reached so far that I have a new breakpoint type which only accepts my custom language files. Now is see that the methods canPutAt() and createBreakpointProperties() are called, but I do not see the breakpoint. The fact that createBreakpointProperties is called every second click on the same line points me to the fact that the breakpoint is being registered somewhere (the second click is obviously removing it). Still, I can not see my breakpoints. Is there something I need to do about the language annotator?

Thanks,
Dan

0

Do you have any exceptions in idea.log?

Hello Nikolay,

thanks for the helpfull hints. I reached so far that I have a new breakpoint type which only accepts my custom language files. Now is see that the methods canPutAt() and createBreakpointProperties() are called, but I do not see the breakpoint. The fact that createBreakpointProperties is called every second click on the same line points me to the fact that the breakpoint is being registered somewhere (the second click is obviously removing it). Still, I can not see my breakpoints. Is there something I need to do about the language annotator?

Thanks,
Dan

---
Original message URL: http://www.jetbrains.net/devnet/message/5244308#5244308



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Hello Nikolay,
no, i do not see any exceptions in the log file while placing beakpoints.

0

Are your breakpoints shown in the Breakpoints dialog (Run | View Breakpoints)?

Hello Nikolay,
no, i do not see any exceptions in the log file while placing beakpoints.

---
Original message URL: http://www.jetbrains.net/devnet/message/5244550#5244550



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Hi Nikolay,
the breakpoints are visible in the Breakpoints dialog. The fact that the breakpoints are not showing up in the editor has probably to do with the fact that the files which I am placing breakpoints in, are not from the local file system. So they have no proper extension. Hence when I try "View Source" in the breakpoints window I receive the "Register File Type" dialog.

Note: breakpoints in files from local file system are visible.

0

How did you open file in editor and put breakpoint in it if its filetype isn't recognized?

Hi Nikolay,
the breakpoints are visible in the Breakpoints dialog. The fact that the breakpoints are not showing up in the editor has probably to do with the fact that the files which I am placing breakpoints in, are not from the local file system. So they have no proper extension. Hence when I try "View Source" in the breakpoints window I receive the "Register File Type" dialog.

---
Original message URL: http://www.jetbrains.net/devnet/message/5244687#5244687



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

The files come from my custom database file system. File type is resolved by the file system so the extension is not really needed in my case. Anyhow, i faked the system by using a dummy extension, and this fixed the navigation to code. At least for files with one editor provider, for those with multiple editor providers, it always navigates to the first editor. The breakpoints are still not visible in the editor. This has probably to do with my weird file system.

0

Which editor provider do you use for your files? Breakpoints are added to editors by using document.getMarkupModel().addPersistentLineHighlighter(...)
so it will be properly displayed only if you're using default editor provider.

The files come from my custom database file system. File type is resolved by the file system so the extension is not really needed in my case. Anyhow, i faked the system by using a dummy extension, and this fixed the navigation to code. At least for files with one editor provider, for those with multiple editor providers, it always navigates to the first editor. The breakpoints are still not visible in the editor. This has probably to do with my weird file system.

---
Original message URL: http://www.jetbrains.net/devnet/message/5244701#5244701



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

I am using a custom editor provider that returns a TextEditor from createEditor(). The reason for having several providers is the fact that I use several views for the same database file (e.g. for displaying package spec and package body in different tabs, as well as for linked ddl files). This way I can group in one editor bundle everything that belongs together (displaying tabs at the bottom of the editor). Now, every other feature regarding text editor is working properly, things like syntax highlighting, gutter annotations, page numbering, intention balloons... Why is the debugger markup model behaving differently if not used with the default editor provider?

0

Do you use TextEditorImpl or create your own implementation of TextEditor? If you're using your own implementation you need to create an Editor
instance with Document obtained from FileDocumentManager#getDocument.

I am using a custom editor provider that returns a TextEditor from createEditor(). The reason for having several providers is the fact that I use several views for the same database file (e.g. for displaying package spec and package body in different tabs, as well as for linked ddl files). This way I can group in one editor bundle everything that belongs together (displaying tabs at the bottom of the editor). Now, every other feature regarding text editor is working properly, things like syntax highlighting, gutter annotations, page numbering, intention balloons... Why is the debugger markup model behaving differently if not used with the default editor provider?

---
Original message URL: http://www.jetbrains.net/devnet/message/5244780#5244780



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

I use TextEditorProvider.createEditor(), but I wrap the returned editor in my own class implementing TextEditor. I did the wrapping to be able to return a different value from getName() instead of "Text" (the name of the editor is displayed in the tabs on the bottom of the editor bundle in case of multiple providers).
Now, I see that files from local file system (using same approach) accept and properly display breakpoints. So I have to check what I do different for files coming from database. I will come back to you as soon as I know more. Thanks a lot for your support so far.

0

To revive this thread... I have found the problem. It is the misuse of the multiple editor providers to show different contents for the same file, by presenting two different virtual files to each individual provider which accepts the main file. Hence the markup model was changed for the Document of the main file. The fix was to bring them in sync by using the same Document instance.

Anyway, I wander if there is any xdebugger support for files with multiple editor providers, i.e. "navigate to code" to somehow switch the editor to the adequate provider. If not, is there any planned?

0

Please sign in to leave a comment.