How use debug in Eclipse correctly? - eclipse

I know this could sound as a 'very easy' question, but I really don't understand or found anywhere, how to use the debugger in a Java EE (JSF) application correctly.
I mean:
1. open eclipse
2. insert a break point at code
3. click into the 'bug' button
4. glassfish starts
5. interact into the web site until the break point is activated, right?
Wrong.
Nothing happens.. And I tried many different ways and it seems not to be working at all.
So I wonder if you guys could me explain how to do it (and I swear I will paint the instructions into the wall =] )

Right click on your project, Debug As -> Debug on Server (Alt+Shift+D, R)
or press the pull down menu next to 'bug' button, and follow the same menu order.

Related

How do I open a built-in tutorial in Eclipse?

I just downloaded Eclipse. The welcome page asked if I'd like to follow through a tutorial, so I happily started. However, at one point, I right clicked and somehow closed the tutorial, and now I cannot figure out how to re-open the tutorial. I've gone through most of the options under "Show View" and tried restarting the IDE to get the welcome page again, but none of these have worked.
Where on the IDE can I open a tutorial?
This is because Eclipse's tutorials are called "Cheat Sheets". In order to open a cheat sheet, navigate to Help->Cheat Sheets... and select the one you'd like to follow through.

Google Plugin for Eclipse gone

This is the second time this has happened to me, and the first time I chalked it up to some "user error". It happened again so I will post in here for any ideas / thoughts.
Here is a picture of the installed software I have.
I have no option to create a web application project, I can't show the Development Mode View, doesn't recognize GAE or GWT library folders, JSNI methods don't have auto-complete, etc.
The only thing that appears to be working, is the "Google" properties inside the project, I can edit those.
Everything appears to be installed, is there something I am missing?, or any way that I can see why some stuff is missing?
I have found 2 good methods to handle Eclipse breaking.
Start from Scratch
a. Download or Locate an Eclipse Archive and place the contents in a new folder.
b. Launch the New install.
c. Perform Updates.
d. Re-install all necessary addons.
Rollback your install/updates to a working version.
a. Select the Help Menu
b. Select About Eclipse (Usually at the Bottom)
c. Click the "Installation Details" Button (Lower Left Hand Corner)
d. Select the 2nd Tab "Installation History"
e. Select one of the Available options
f. Follow the wizard instruction to "Revert"
Neither of these options have ever failed in getting me back to work. They are not the most expedient, but they work every time.

GWT shows an empty page

From time to time I run into it. E.g., right now I can't see anything in my project but everything is OK in a sandbox project.
I've already found the bug. I used MapWidget before calling loadMapsApi (see the guide). But there might be something less obvious next time. It would be better if a web page gave an error message or some feedback.
What should I use?
I press Debug As -> Web Application. It allows me to use breakpoints and debug client code.

eclipse stop popup "Web launch already running"

I am developing in PHP with Xdebug and for some reason every now and then the debug session stops working, so i click again the debug button but it gives me this error all the time "Web launch already running", so i have to go to Debug Perspective and click "Terminate and Relaunch".
Is there a way to make eclipse automatically terminate and relaunch or launch two sessions or don't show this popup, for 2 years this popup has been bugging me xD
As noted in response to questions like this one and this one, the best current solution appears to be binding "Terminate and Relaunch" to a keyboard shortcut.
Not automatic, but at least a lot less clicking around.
I have taken care of pesky popups in Eclipse with AutoHotkey script which have worked very well. I could create an AutoHotkey script which sends specific keystrokes automatically every time there is a specific pop-up.
So the flow I had in mind was as follows :
You click on the debug button -> The Error popup appears and as soon as that happens the AutoHotKey script kicks in and automatically does what you have to do manually.
If you think that might be worth looking into then we can talk more in a Chat session somewhere. I would need some information about the Pop up using the AU3_Spy.exe bundled with the AutoHotkey Installer.
Searching on Google, I found that many people have the same problem.
Bellow are some links that help you, I think:
https://aptanastudio.tenderapp.com/discussions/questions/123-definitive-installation-guide-for-php-debugging-on-linuxubuntu
A good article: http://www.latenightpc.com/blog/archives/2008/05/24/a-complete-lamp-development-environment-xampp-eclipse-pdt-and-xdebug
See this, too: http://www.eclipse.org/forums/index.php/m/57493/
Take a look here, too: Getting error in XDEBUG
So, read and try, read and try.

how do i "View in browser" a mvc 2 app?

This is probably a pretty simple question, but I don't see how to view in browser like I would for a traditional asp.net application.
If you're using Visual Studio, Ctrl + F5 to run without debugging and Cassini will take care of the rest (or do you mean from inside visual studio like you can with webforms)?
Sadly, it seems that Microsoft has acknowledged this as a bug.
There are a couple workarounds you can try -- though none of them are exactly what you are looking for. None of them let you start your web page from any arbitrary page simply by right-clicking.
One inexact workaround that is good enough for me is:
If you open up your project properties and go to the Web tab you will see the "Start Action" setting. Change this to "Don't open a page. Wait for a request..."
Now when you start debugging, nothing will happen! (oh no, it's worse!)
Now you can right-click on the Cassini system-tray icon and choose to open the browser from there. You only have to do this on your first session of the day. Once you do this, you can navigate to where you want in your site, and keep that browser window open all day. Letting you start and stop debugging from that point whenever you want.
Again, it isn't exactly the same, but it isn't terrible either.
Just run the Visual Studio Project and it should open the application's Index view of home controller by default!
If you are talking about IIS file viewing, in IIS go to your application -> switch to content view -> go to default.aspx -> right click -> choose browse