How to get access to logcat in IntelliJ IDEA in non-Android project? - intellij-idea

I don't see it at the bottom where it usually sits. I also tried "Log Viewer" plugin which should display logcat from any project, but that plugin fails to detect my emulated device.
I mean IntelliJ IDEA, not Android Studio.

Set
Gdx.app.setLogLevel(Application.LOG_INFO);
in your create() class, the log will be shown in the "Run Window".

Related

How to preconfigure the debug log level filter in IntelliJ Idea (PhpStorm/WebStorm) when running React Native

I have a React Native project I'm running from PhpStorm using a run configuration, which launches Metro, launch-ios, Chrome debug etc. which all works fine.
The JS logs appear in the console of the IDE under the name of "iOS Build " but the default filter doesn't include debug logs. I can click "Filter > Debug" and turn it on but then it resets back to unticked ever time I restart the debugger. Presently I am restarting the debugger a lot because I am debugging the first-boot cycle of the app.
In the documentation for other run/debug configs, IntelliJ has log options (which they are recently changing to a separate panel). I think you can preset the filters there:
https://www.jetbrains.com/help/idea/setting-log-options.html#d3ebaf91
However for the React Native plugin, the run/debug config pane doesn't include any options for drilling down into the logs.
https://www.jetbrains.com/help/phpstorm/2022.1/react-native.html#ws_react_native_run_and_debug
What I want is for the Debug Level to be or remain ticked as well by default when I run the configuration.
Is there some configuration file perhaps with extra options that are not represented in this plugins GUI?
Can I get the IDE to remember the state of the Debug pane generally? For example also I keep having to drag the columns around each time to my preferred layout.
I know I could view the logs in Chrome, but I prefer headless mode and an IDE-centric workflow.
this is a bug, tracked at WEB-39848; please vote for it to be notified when it's fixed

Is there a way to see console.log without choosing debug js remotely?

With old Android versions, app is so slow working when debug js remotely is active. Is there a way to see the logs which we have on Chrome ?
If Chrome is the issue, you can use React Native Tools Extension on Visual Studio. That way you can simply use VS code itself for reading logs.
EDIT: If putting Remote Debugger ON the issue, go ahead and use react-native log-android or react-native log-ios . Click here for more information on accessing console logs
You can use the server terminal for that, all consoles are going to be availabe there for you and you wont need to enable "debug remotly"

How can I restore missing "generate sample content" functionality for new Flutter projects in IntelliJ IDEA CE?

The ability of the "generate sample content" popup menu for a new Flutter project in IntelliJ IDEA seems to have disappeared on my installation. (It used to work until recently) (IntelliJ IDEA CE 2019.1.1 Build #IC-191.6707.61, Apr 16, 2019, on macOS 10.14.4)
When I click the checkbox to enable the popup menu, the menu is not populated - its just blank. I've re-installed IntelliJ IDEA, as well as run flutter doctor in the terminal (no errors from flutter doctor), but the popup menu remains empty.
Does anybody know how to get this menu to be re-populated?
I just had the same problem and I noticed that my Android SDK was not configured correctly in IntelliJ. After specifying the path to my SDK in IntelliJ's settings I can now use the "generate sample content" functionality.
Go to IntelliJ > Preferences > Appearance & Behaviour > System Settings > Android SDK and specify the Android SDK location. Presumed you've installed the Android SDK already, you'll find it on Mac OS by default at /Users/<user-name>/Library/Android/sdk and on Windows at C:\Users\<user-name>\AppData\Local\Android\sdk.
Make sure to update your IntelliJ version, Dart & Flutter plugin, Android SDK and run flutter doctor to check if everything is set up correctly.
Also checkout this issue, which describes the same problem.

Newbie cannot properly run or debug fresh project using Gluon multi-view with FXML in IntelliJ

I created a brand new Gluon mobile multi view with FXML project in IntelliJ CE 2018.2.1 using the Gluon plugin version 2.7.0 and Gradle 4.10.1
I open the Gradle tool window, Pick Project(root), Tasks, Application, run and I do see the generated application run properly, I believe, though it defaults to a mobile device sized window.
I get this error message:
SEVERE: javafx.platform is not defined. Desktop will be assumed by default.
What I'd like to do is debug a single JavaFX program in IntelliJ for all of the supported platforms (except embedded) in Windows and see more or less the right screen sizes before I start plugging in my iPad/iPhone/Android phone/Android tablet/Mac just to get the code logic right.
Is there some setting that would let me switch between simulating different devices as a first stage?
When I double click "debug" I get the following message and the window hangs.
Listening for transport dt_socket at address: 5005
Is this related? Are we trying to debug an actual device by accident?
As for the app size, when you run on desktop it defaults to a phone form factor of 335x600. This comes from the Display service:
#Override
public Dimension2D getDefaultDimensions() {
return isTablet() ? new Dimension2D(900, 600) : new Dimension2D(335, 600);
}
You can change to a tablet format of 900 x 600 if you set the charm-desktop-form system property to tablet.
Or you can simply override these settings, and set your desired size:
#Override
public void postInit(Scene scene) {
Swatch.BLUE.assignTo(scene);
if (Platform.isDesktop()) {
((Stage) scene.getWindow()).setWidth(400);
((Stage) scene.getWindow()).setHeight(800);
}
}
When you deploy your app to a mobile device, it will just adjust to the size of its screen.
Related to the message javafx.platform is not defined running on desktop, that system property is not defined, so it is a warning message that informs that desktop is selected. When you run on mobile, the proper Android or iOS value will be set for the platform.
Finally, about debugging, when you run on desktop you initially can debug only the desktop application, but you can modify the size of the application as mentioned above.
To debug the mobile application, you have to run either the iOS simulator or the Android emulator.
This question shows how to debug on Android from IntelliJ, but you have to actually deploy the application to a mobile device.
On iOS, providing you have a Mac, you can use the launchIPhoneSimulator task to launch the iOS simulator, where you can choose any of the possible iPhone or iPad devices with their different screens resolutions. In this case you don't need a device.
Solution to part 2: Debug the Desktop version from inside IntelliJ.
In IntelliJ, make a new Run configuration of type Gradle and use "run" not "debug" as the "task". Then choose "backpack [run]" from the toolbar and use the "debug" icon on the toolbar. IntelliJ will run the app with the JDWP options enabled and connect the debugger to it.

Zerobrane debug on Corona SDK

I try to debug with Zerobrane , code for Corona SDK, but when I press the button to start the debug, popups all the time a window saying that main.lua is used from other programs. There is no other program using the main.lua
When i press the button then the corona simulator starts and this is using the main.lua . When I kill the corona simulator the popup windows disappear.
Any other experienced this?
Thanks in advance
There was a fix for the files not closed, which may be related to this issue. You can try with the current master branch version to see if it fixes the problem.