Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I view a resultset in Eclipse debugger as a table

Tags:

I have a resultset in Eclipse created from an SQL query.

Coming from the world of Visual Studio, I expected to find a watch view of my variable that shows me the resultset as a table instead of just showing all the fields and properties.

Does such a solution exist for Eclipse, maybe as a plugin?

like image 916
thedrs Avatar asked May 13 '12 13:05

thedrs


2 Answers

Great question!

Sadly, any plugin would have to be created based on the existing debugger. The following article talks about how to create a debugger for a new language in eclipse: http://www.eclipse.org/articles/Article-Debugger/how-to.html

The article gives great details on how the debugging process works in eclipse. I believe this would be a great feature to have in Eclipse and suggest you submit a new feature request: http://www.eclipse.org/stem/feature_request.php

As a work around, I would suggest using a string variable that would contain your query, add that string to your watch list, so you can access it while debugging. Copy the contents of the string and paste it into a tool like SQL Query Analyzer.

like image 112
James Oravec Avatar answered Oct 04 '22 21:10

James Oravec


I don't know if there is a plugin that will format a ResultSet in the debugger, I've never seen such a thing. However, the Data Tools Platform (DTP) provides tools for interacting with databases, including table views of query results, etc. If you have the Eclipse IDE for Java EE Developers package, DTP is included in that already; otherwise, you can install it.

Here is a good tutorial on using the tools.

like image 23
E-Riz Avatar answered Oct 04 '22 21:10

E-Riz