I have a win-form Application with a web browser control.
i use a JavaScript code in this web browser.but some times my JavaScript code return error
I want to know is it possible to debug JavaScript code in vs.net 2010?
You can debug Javascript running in an ASP.Net application (WebForms or MVC), but not in your Win Forms application. If you have the code for the site that the browser control is running then you can start a session of that in VS 2010 and debug away.
Related
I'm developing a PHP project which utilizes Javascript with jquery for a number of functions (particularly authentication/api calls). The long and short of my problem is that I cannot get Javascript console logs to appear in the eclipse console. At all.
Not only this, but some of my functions work...sometimes. I'm trying to debug the cause of this, but without any form of logging occurring, it's extremely difficult.
How do I configure my Eclipse Neon PHP project to output Javascript console logs?
Edit: The project is a PHP Web Application. I'm currently running a local PHP server for the project via the php command php -S localhost:8000
The JavaScript built-in function console.log(message); logs the given message to the console in the browser window, which is accessible via the developer tools of your browser.
If you open your webapp via the built-in Eclipse browser, you do not have access to those tools, just because Eclipse is using a closed, minified browser (just like the browser widget for QT or Visual C# WinForms or even a distributed Electron app).
Using the Eclipse browser is not really helpful when trying to debug webapps, because you can't even see loading times of the pages and so on.
I am building a Xamarin Android webview mobile app. I have gotten to a point that I need to debug some Javascript code but I cannot get the debugger to work on the razor views in Xamarin. Not a single breakpoint is hit on the client-side during debugging.
I have tried using the below code to enable debugging of my web contents in my main activity OnCreate method. Link: Android.Webkit.WebView.SetWebContentsDebuggingEnabled :
WebView.SetWebContentsDebuggingEnabled(true);
I also tried using the debugger keyword in my script to see if I could be lucky.
But none of the above seem to help the situation.
Are there any pointers on how to enable client-side debugging in Xamarin?
I cannot figure out how to debug javascript, using PyCharm, in a Django template.
When I attempt to debug a template -- by using the context menu item Debug while in the template -- the debugger launches, chromium launches, and I see the following error message in the PyCharm debugger console:
GET http://localhost:8000/login net::ERR_CONNECTION_REFUSED
Needless to say nothing shows up in the chromium window.
I've seen hints that I'm supposed to "open the generated file" from within the PyCharm debugger scripts tab. But since chromium isn't loading anything there's nothing to open.
I have the JetBrains chromium debugger installed and, so far as I can tell, running.
What's the procedure for debugging javascript in a Django template from within PyCharm?
Set up a debug configuration for Javascript (not Remote Firefox/Remote Chrome as the documentation might lead you to). Set the URL to the entrypoint of your application that renders the template and run this config. It should launch a browser and stop at any breakpoints you set in your javascript in pycharm.
Why not using a browser tool like firebug in browser or google chome debugging tools (depending on the browser you use), If your code is client side, since I assume that the server side part of the application is written in python scripts it's the easiest solution.
I have also used JSDT in eclipse but it was not as convenient.
For the error you posted I think it's server-side / networks error, check your views.py or an example from the django tutorial to see if it is exposed in WSGI (django default web server ).
I will develop MVC with ASP.NET and I can run exe file on the IE browser client.
This code
MyObject = new ActiveXObject("WScript.Shell");
MyObject.Run({application path});
But I can't call it on the chrome brower. Do you have sample javascript code?
Thank you.
Be aware that alot of companys disable activex because of security reasons. And starting a program with javascript code is a bad idea (even if the browser allows it!).
Is the program related to some kind of file type? You might load a file for the program that let the browser start the application. Like downloading pdfs starts acrobat...
Is it possible to remote debug script code with Visual Studio 2010?
I have a JavaScript issue which occurs only on IE6/IE7. I’m developing on Windows 7 (64-bit) so can only install IE6 and 7 as Virtual Machines.
I’ve setup remote debugging between my development machine and the Virtual Machine and can successfully attach to the IEXPLORE process but I cannot debug it as Script code.
In VS2010 from Debug | Attach to Process, when I try to Attach to the IEXPLORE process on the remote machine VS2010 listed it as x86 type (Script is not displayed). And when I press Select to select the Code Type the choices do NOT include the script option (only, Managed, Native, Silverlight, T-SQL, Workflow).
Thus, although the debugger is attached to the remote process, it is not debugging the script so my breakpoints do not hit.
I have enabled debugging in Internet Explorer on the Virtual Machine.
This page http://msdn.microsoft.com/en-us/library/bb385613.aspx suggests that remote debugging of Script code is possible. However I cannot get it up and running. Any ideas would be greatly appreciated.
Check out this project, which lets you run IE6, 7, 8, etc together:
http://www.my-debugbar.com/wiki/IETester/HomePage
It's not 100% perfect, but it's always worked for my purposes.
Here's a trick that works with Visual Web Developer Express.
Open a local page in VS and start to debug it(or hit F5)
IE should popup and open this page.
Type in IE's address bar the url of the remote site.
Go to VS and you should see now a list of remote files in the Solution Explorer pane
Put a breakpoint in a remote file, where you want to stop it.
And refresh the page in IE.
You should hit the breakpoint.
I had this problem until I discovered that script debugging was disabled in IE on the remote machine. I re-enabled it using this work around and "script" now appeared in the "Type" column when attaching to process on the remote machine.