Can I debug gwt component directly in intellij IDEA - debugging

I am currently working with IntelliJ IDEA and I try to debug gwt components directly in the IDE.
I know I can use Chrome DevTools to debug, but it's always a pain, when the variables names change and it takes quite a long time to debug.
I thing I have seen somewhere the fact that you can directly debug your component in IntelliJ but I am not sure where I have seen that.
I am in superdevmode but when I add a breakpoint in my java class in IntelliJ it does not get validated and does not stop in IntelliJ. It only works in Chrome.
Here is my gwt configuration
Thanks a lot.
Thoma

It sure does work from within IntelliJ.
One thing I noted in your screenshot : Set a checkbox with "with JavaScript debugger".
That is the only thing I see different with my setup, in which breakpoints work in IntelliJ, and in the browser.

Related

Front end reload on 'Build Project' IntellIJ using SpringBoot devtools

In IntellIJ not long ago I was able to make changes to my html/thymeleaf files and hit 'Build Project' and Spring Boot didn't have to restart the entire app. It would showcase the changes in my web browser (Firefox, Chrome). I have researched and tried a variety of changes and can't seem to find the issue/error to get me back to faster, efficient frontend productivity.
It's only a setting inside of IntelliJ Idea. You can see here what you need to set, and to have in a build.gradle or pom file.

BootRun not booting?

I'm getting a problem when booting BootRun with Gradle !!
Before, when I ran the program I could see the Spring logo and all the DB and controllers mappings, now It just keeps running without this information being displayed in the console.
I attach picture ...
Could anyone point me out what is going on here ?
Just click the "Toggle view" option.
In your case it's this button:
The icon may be different from one IntelliJIDEA version to another. For example in my case (IntelliJ IDEA 2018.1.5 (Ultimate Edition) Build #IU-181.5281.24, built on June 12, 2018) it looks like this:

How to set up debugging in GoLand?

I am trying out GoLand and hear that the debugger is supposedly awesome, but I can’t find any documentation explaining how to set it up (GoLand is in preview stage, so that’s not really surprising). My use case: I am writing a REST API to which I send requests using curl. Could someone please tell me, step by step, how to get started with the debugger ?
[edit 1] (moved from comment) When I click Run/Debug (or Run/Run), a window is displayed, asking me to edit configurations. I am given a choice of several kinds of configurations, I try to choose "Go application" but the Debug button never is grayed and I can't get it to become clickable. I am very new to GoLand, I may be missing something obvious, but I can’t find whatever settings are missing.
[edit 2] It turns out that my workspace did not conform to the Go specifications : my code was not in a directory named src. Now that it is the case, I can click Run/Debug and GoLand seems to be doing the right thing, except it doesn’t stop at breakpoints or otherwise behave like a debugger, my code just runs.
[edit 3] Tried again, and it works. Sort of. I have no idea why it works now, even though it didn’t previously and I didn’t change anything. Now breakpoints work at some lines, and not at others. Or the debugger stops at the breakpoint, but I wait forever for the list of variables to be loaded. Well, it is a preview, after all...
[edit 4] I was notified just today that a new version of GoLand was available. I upgraded, and debugging is working well for me now.
GoLand will not enable the debug action (although run is available) if your code does not reside inside src. There is no warning about this, so it might be really a pain to solve this.
Additionally, depending on your project’s structure it might be possible, that debugging is still not working. In that case, it might help to remove all run configurations and create a new one. There’s is a bug report about this behavior.
PS: Although the OP mentions the first part in an edit of the question, but it think it’s worth mentioning in an answer.
Things changed in goland since #Jamillo Santos added his reply.
To start with, there's no more "Go Application".
The easiest way is to locate the file containing the main() function.
There should be a small triangle pointing to it, like in the attached screenshot:
When you click on the small green triangle, you get a menu with Run/Debug options.
Each will create a go build configuration.
You can edit that go build configuration and add the program arguments for your application.
For example, if your program have a command line argument of --arg=value you can add it like this:
I was facing this same issue and I solved by using the "Go Application" configuration (at the Run/Debug Configurations window), instead of the "Go Single File" configuration.
So, go to the upper right corner of the Gogland and "Edit configurations".
Then, add a new configuration using the "Go Application" profile.
After saving, you should be able to debug your code. o/
An easy way to enable this configuration is to use the #user1793301 method and right click on the file you want to run and select "Debug 'go run .go'".
POSSIBLE EXPLANATION
NOTICE: I did not look any further details about it.
Fact: "Go Application" configuration does build the binary executable before running it.
Fact: I could see looking at the console output (inside of the Goglang) is that the IDE uses the DLV as debugging tool.
Fact: I found a dlv debug at the DLV documentation and it seems to compile and debug the code.
Hypothesis: The guys from Jetbrains did not implement it. Or at least not YET.
On version 2019.1.1 there's no more Go Application. Use Go Build instead. Here I am debugging a single script file, but if you have a server app or smth, just point to the main app file:
Notice that in the Files field you have to specify the actual file path. You can put more files (if you want to have more starting points) by separating them with a pipe |. For each file you want to be able to debug, you need to specify the full path.
Again, if you are debugging a server app or something else, that has a single starting point, you only need the startup file specified in the config. :)
I had this exact problem.
Deleted and recreated the Debug run configuration. Debugging then worked perfectly.
I followed the following procedure to start my golang server in debug mode. (You might want to use some other method than creating a makefile for starting your server maybe)
Create a makefile
Define your server/worker startup command in the file
Run it by creating a new configuration for Makefile
Go to Run -> Attach to process -> choose your running server
This will attach the debugger to your process.
Note:
You might need to restart your server for this to work.
The IDE will ask you to install gops, do install it. Without installing gops you won't see any running process.
I right click on project (main.go inside) and choose "Debug ..." and it work

Xamarin Android publish breaks app

My android app builds and runs just fine on debug, but when I switch it to publish and deploy the app manually, things start breaking. Images are missing, entry fields don't work (placeholder text shows up, and the keyboard pops when I click on the field, but nothing I type in shows up), and some of my tap handlers aren't working. Are there any suggestions on what would possibly cause this? Seems odd that just changing to publish would cause that...
Try to change your Release linker settings to Don't Link/None and see if the same behavior of the Debug deploy comes back. If so, you have a problem with the linker stripping things it shouldn't.
developer.xamarin.com/guides/android/advanced_topics/linking
This will of course increase the size of the package dramatically and you'll want to play around with the different preservation methods.
https://developer.xamarin.com/guides/android/advanced_topics/linking/#Preserving_Code
https://developer.xamarin.com/guides/android/advanced_topics/linking/#falseflag
https://developer.xamarin.com/guides/android/advanced_topics/linking/#linkskip
I would highly recommend attempting to linkskip any third party assemblies in full before going into complete investigation mode. You can then use a Custom Linker configuration file to define exactly what you should not eliminate via the linker:
https://developer.xamarin.com/guides/cross-platform/advanced/custom_linking/

Yii2 app debugging

How do you debug the yii2 app using any IDE(eg. eclipse, netbeans, sublime, aptana, etc...) like debugging in visual studio in which we can put breakpoints? This is much needed, for some errors take days to fix; so any debugging method would be helpful. Thanks in advance!
For the neatbeans (and also for the other IDE) This is possibile if you have properly configurated Xdebug and the Yii2 app if defided correctlty in a netbeans project netbeans.
You see https://xdebug.org/docs/install for xdebug install or
http://wiki.netbeans.org/HowToConfigureXDebug
Once you have installed and confiured xdebug you can run the application in (netbean) debug mode and put breakpoint ... inspecting vars .. trace .. move in the code step by step .. with full debug functionality

Resources