Access JavaScript & HTTP errors from CutyCapt - cutycapt

Is there any way to access webkit JavaScript and HTTP errors that happen when capturing a page with CutyCapt? I'm trying to debug a thumbnail capture for JavaScript generated documents.

This is not currently possible. I would recommend using a tool like Wireshark to debug any HTTP errors that might occur. It would be easy to add tracing code for network replies to CutyCapt and there are some patches on SourceForge and/or GitHub that do that. I am not sure what could be done to trace JavaScript errors, but ordinarily there should not be any that do not also occur when a page is loaded in a browser. Qt comes with a sample application that implements a rudimentary web browser that could be used for this purpose. I think it also comes with the standard debugger, but I might be misremembering that.

Related

Getting overview of asp.net c# api calls

im currently debugging a larger asp.net mvc solution.
Now I'm pretty sure that a API call that is made serverside in c# is returning some kind of faulty value. The problem is though, the project has a LOT of api calls that looks like each other.
When i debug websites in the browser, I've gotten used to using the browsers developer tools "network" tab to view all external calls to API's done by javascript, and methods in the solution.
Is there some way to get a overview of all api calls that happens in c#/serverside, as they happen?
Getting overview of asp.net c# api calls
VS IDE does not have such option to view all the apis that are called during debugging.
But some VS extensions may realize it. You can try Fiddler extension, PostSharp extension or use Runtime Flow(thanks to Sergey for sharing it).
In addition, you can try to use encoding method like enable System.NET logging and get its request. See this net framework network trace and net core trace.
If these do not meet your requirements, you could suggest a feature on our User Voice Forum.(click Suggest a Feature).
After that, you could share the link with us here and anyone who is interested in it including us will vote it so that it will get more Microsoft's attention.

How to HTTP GET or POST with Matlab or Octave?

In Matlab Function Alphabetical Reference I only found the following function:
web - Open Web site or file in Web or Help browser
Isn't there a way of accessing a web resource without opening a browser?
Or how to close the browser?
I tried web stackoverflow.com -browser and it doesn't open the browser, but fiddler tells me that no web resource was fetched because of this command.
Edit Somehow Fiddler doesn't gets the Matlab http traffic, so I guess that the web url -browser command works for me, but I'd rather use the urlread command as suggested
urlread might do the job. In case of proxy issues this post might help as well.
Looking at the implementation you might see that The MathWorks is heavily relying on Java libraries.

Debug embedded javascript file

There is a class library project with embedded javascript file, with a lot of functions (clint-side implementation), is it possible to debug them?
If I set breakpoints inside this file, they never break.
You can, but there is some setup involved - there's an explanation here:
http://weblogs.asp.net/scottgu/archive/2007/07/19/vs-2008-javascript-debugging.aspx
Once set up it works pretty much the same way you'd debug server-side code.
Edit: I should add that it depends what you're doing as to where is the best place to do your debugging. If you're strictly doing client side debugging then I'd suggest using Firebug etc as suggested by the other answers, if you're moving between client and server side code then it's less clumsy to use the Visual Studio tools as above.
You need to debug javascript client side with something like Firefox/Firebug, FirebugLite, or IE8 Developer tools.
Debugging JavaScript has to be done via the client. Breakpoints in the back end would never be triggered because the back end never actually runs the code.
The method for debugging JavaScript varies by browser. For Internet Explorer, there is an Internet Developer toolbar and a Script Editor that will help. For Firefox, tools such as the FireBug addon are very helpful.

Make GWT interact with ASP.NET Web Service

Does anyone know of a good article or tutorial on the Internet demonstrating the use of GWT leveraging a (ASP.NET) web service cross domain?
To my knowledge, interacting with either XML or JSON should be possible from GWT, but becomes a lot more difficult when the web service is on a different domain. I've tried finding an article that demonstrates this setup, but without any luck.
There are a few options available:
use the Cross Site linker - it should make cross domain request easier, simply add <set-linker name="xs"/> in your module file (*.gwt.xml)
window.name hack :) Be sure to read the post with the original dojo proposal
JSONP
many others ;)
But first I recommend reading http://code.google.com/webtoolkit/tutorials/1.6/Xsite.html - it should get you going :)
I was initially going for a JSONP approach (as suggested by Google), in order to do cross site AJAX calls in JavaScript, but ended up with too many hacks that I had to incorporate into the ASP.NET web service in order for it to work.
The solution, in my case, was instead to use GWT RPC to a JAVA servlet, acting as a proxy, which then would call the ASP.NET Web Service using SOAP. The SOAP Java classes was generated using the wslist tool that is part of JAX-WS project (as demonstrated here).
Using the GWT RPC, I was still able to call the JAVA servlet asynchronously, giving the user a seamless experience.

ViewState and Web Load Testing

I'm trying to do load testing against an ASP.NET web site and I need to be able to parametertise field value of a page to test different code paths.
I had great success with JMeter when load testing a JSP web site before. However, because ASP.NET encodes all form values in the ViewState, changing control values does not really work.
I Googled this problem and people said the web testing tool in Visual Studio Team Tester Edition works well with ASP.NET pages. However, it cost quite a bit so I am just wondering does anyone know how to get around the ViewState issue with JMeter or WAPT?
I've used WebLoad before. Its scripting language is basically JS, so you may be able to find controls on the page using JS and invoke them as part of your load script.
WebLoad is free.
I've figured out how to do this, basically you cannot simply record a static script with JMeter. What you need to do is to record a request, send it, capture the viewstate in the response and send the viewstate back in next request.
If you need more details, I've documented how to do this along with some screenshots on my blog post
As webapps get more complex (ViewState, AJAX, etc) it is tougher and tougher to use traditional load testing tools. That's because they try to jam a ton of virtual users on a very small amount of hardware resources.
My company, BrowserMob, took a different approach. We build a load testing service that uses real web browsers to drive load. Your scripts end up being essentially functional tests (specifically Selenium scripts). My background has been in Selenium for some time (I created Selenium RC and founded OpenQA.org), so as soon as cloud computing made it possible to rent the 5TB+ of RAM necessary to do this, I jumped on the idea :)

Resources