How do you start the app with the profiler in "trace java methods" mode? - android-studio

We are ready to optimise app startup time.
The ultimate goal is to, quote
cold start into fragment X as quickly as the calculator is starting up
I do have a few ideas on what we could tweak to try and speed up loading, but I'd like to verify them before bothering to try them out.
So I open the profiler view and hit the app launch configuration.
Ok ... no trace.
Unfortunately, I cannot hit the record button until after the app has loaded. Which doesn't do me any good because I'm trying to get a profile of the startup.
Any way I can launch with the record feature already active?
UPDATE
Yes, you can if you edit the run configuration, buuuut that's not giving you any relevant information because even then, it only starts recording the information AFTER the startup.

To enable advanced profiling, follow these steps:
Select Run > Edit Configurations.
Select your app module in the left pane.
Click the Profiling tab, and then check Enable advanced profiling for older devices.
Select Run > Profiler.
This will start the app and start recording immediately, you only need to hit stop recording once you want.

Related

How to speedup debugging on Azure Service Fabric?

Debugging an ASP.NET MVC application on the Azure Service Fabric platform takes a long time. How do I speed it up?
If you are talking about cloud cluster debugging then that is going to be a bit slow process if you are attaching debugger to that cluster, in which case you should be relying more on your application logs to find a problem because you should try to replicate the problem in your local cluster first and debugging that locally will be much easier.
Now if you are trying to debug on local cluster then couple of things are important to speed up things.
Set your cluster to run in 1 node configuration rather than 5 node
configuration.
Set your "Application Debug Mode" to "Refresh Application". To do
this, right click on the fabric project in your solution and click
on properties. you will see a window where you can set project
properties, here you will see this option of setting "Application
Debug Mode".
once you have done this then you can hit F5 and the debugging will be a lot faster. Also remember that you don't need to publish your application every time you make code changes, all you need is build and cluster will pick up changes and you can debug any time. one last thing to remember is that if you make any changes to your settings.xml or manifest.xml files you will need to publish in order for these settings to be picked up by the application.
Hope that helps.

Debug Acumatica Process Failure

I have a client that is trying to run the Validate Customer Balances process in accounts receivable and the process does not finish. What tools are available to debug this?
First of all you need to determine whether the process finishes with an error or is simply taking a long time.
This process has a specific warning stating that balance validation takes a long time:
If you see the process progress indicator spinning, it's most likely just taking a long time. In that case you should either wait until the process finishes or follow the warning to select fewer customer.
If the processes finishes with an error indicator:
Open the trace window and run the process again, error details are usually visible in traces. For example, if you see financial period is inactive in traces then you can resolve it by going to the financial period screen and activating it:
Acumatica's T190 Quick Start In Customization and T270 Workflow API documentations describe the Debugging Process while working with Acumatica.
When you install a new Acumatica version, You must put the Install Debugger Tool checkbox.
You must open Visual Studio project as Admin.
To be able to debug the site's original source code, find web.config file of the Acumatica instance. Setting of Vistal Studio also must be changed as described in documentation.
Change the "False" value to "True".
Go to Debug->Attach to Process... or press Ctrl+Alt+P. Search for w3wp.exe, select the instance you needed and Press Attach.
Then put breakpoints and do debugging as you would do in any other project not related to Acumatica.

How to check what LoadRunner Controller is currently doing?[TruClient]

I have a script which was developed using TruClient for a web application. When I'am going through this test manually everything is working fine. When I'am doing the same test using TruClient in Virtual User Generator everything is fine as well(automated script is written properly).
The problem starts when I'm using LoadRunner Controller. From specified moment all the tests are failed(circa after 40 passed iterations/10 Vusers).
My question is: is there any possibility to check what was wrong on the website? Maybe take some screenshots or something?
(Controller 12.02.0.0 Build 1258)
Not sure if you know about this, but this is where I debug TruClient (and all) scripts which are running in Controller mode.
1) Goto the "Run" tab
2) Double click on the group of the user you want to look at.
3) Right click on the user you want to look at (some could be running or failed)
4) Select "Show User Log"
This will show the console output of the script so will show you then a step starts or finishes, and any LR.log statements you have scripts.
You can enable get screenshots on error (I think it may be enabled by default) in the run-time settings, but I haven't had any luck with the option in there to get a screenshot of every step.
If you restart a user then your logs will be overwritten.

Did Chromecast update break debugging?

Before the recent firmware update, web-based debugging (at port 9222) would persist between activities. Now any transition, say from the home screen to my app, stops the debugger with a message at the top saying...
Detached from the target
Remote debugging has been terminated with reason: target_closed.
Please re-attach to the new target.
It's not a huge problem to start a new debug window, but I'm worried that if the debugger isn't running when my app is loaded I won't get the benefit of the "Disable cache (while DevTools is open)" option.
Any details or workarounds would be appreciated.
UPDATE
Confirmed! In my case at least, the debugger stops with the above error and the latest version of my html, javascript, etc. does not get loaded
Try this as a work around and see if it works: when your page is loaded, run window.location.reload() in the debug console to reload the page (so you get a full debugging info from the beginning without missing anything) or window.location.reload(true) to do the same and clear cache as well.

How do you set up Webstorm 6.0 to breakpoint debug a nodejs application?

I have not found a good simple tutorial for this. I just want the app to freeze at the breakpoints so I can explore the contents of the various variables, particularly their json content.
This is a garbage documentation:
http://www.jetbrains.com/webstorm/webhelp/running-and-debugging-node-js.html#d40161e701
I can't even set up breakpoints. Is it so simple to do this in Eclipse...
UPDATE
Using Webstorm 7.0's early access build, the debugger works flawlessly. I just made a new project, added a breakpoint and used Debug. Stopped at that breakpoint with no problems whatsoever, so apparently Webstorm 6.0's debugger sucks :D
You can get it here: http://confluence.jetbrains.com/display/WI/WebStorm+7+EAP Beware, it expires on 8 August.
I use webstorm and it's great. Having looked at that documentation, I agree. If you're just starting out, you don't need all the remote and attach to existing processes options.
The easiest option would be to rightclick on your main js file and choose debug. Setting breakpoints is the same as in most editors these days, just click left of the line.
If you don't get the debug option when you right click then you need to make a run/debug configuration which sounds worse than it is.
Select "Run" -> "Edit configurations".
Click the plus sign.
Choose "Node.js"
Click on the browse ... button on the Path to Node App js file and choose the file you want to debug
Click Ok.
Click on the bug!

Resources