x
Main Site login Signup

Debugging JavaScript with Awesomium .NET

Hi guys,

Is there any simple that show how to Implement a JavaScript debugger with Awesomium ?

Thank's in advance,

Samir.

asked Mar 19, 2013 at 03:01 PM avatar image smartech 117
more ▼
(comments are locked)
10|1100 characters needed characters left

6 answers: sort voted first

the solution is to setup the RemoteDebuggingHost and RemoteDebuggingPort inside a WebConfig instance that will be passed to WebCore.Initialize method, the inspector could then been accessed by another browser by specifing the configured ip and port, in my case the ip is 127.0.0.1 and the port is 8001 (http://127.0.0.1:8001),

on my application, I need to launch the inspector from my WinForm Awesomium browser, so I wrotte another WinForm that recieve the IP and Port as arguments and dispay it on Awesomium WebControl,

hope this help others developers.

answered May 16, 2013 at 03:23 PM avatar image smartech 117
more ▼
(comments are locked)
10|1100 characters needed characters left

It worked ... almost. The debugging window is tiny. What am I missing? alt text

awe.png (189.0 kB)
answered Mar 27, 2015 at 04:53 AM avatar image BobSome 45
more ▼
(comments are locked)
avatar image freeloadercoder May 13, 2015 at 08:49 PM

Ditto! I did manage to get the view to grow but only after opening up the inspector and giving assigning heights from the HTML element all the way down the dom toward the inspect panels. I wonder if there's a setting that will help get around this?

avatar image freeloadercoder May 13, 2015 at 09:03 PM

Simpler: Set the iframe w/ id inspector_frame to a custom defined height - the default height of 100% doesn't do much for us :)

avatar image arblahblah Jul 18, 2015 at 11:43 AM

Any way that we can get at the source for the debugger to change this? Getting pretty sick of manually changing this everytime i reload the page.

avatar image nalvarez Jan 26, 2016 at 06:38 PM

Everything is inside of inspector.pak. It's using some type of verification -- I read somewhere that if you add spaces to the file, you need to remove them from somewhere else to keep the size consistent. It'll also re-pull the file from the location in the GAC randomly.

If you're hosting it yourself, it may be easier to create a user style sheet, or just modify it after loading.

avatar image RWSILVA Aug 23, 2016 at 12:44 PM

Hi! The simplest way I found to enlarge window is open the inspector in Chrome, then use Chrome Inspector (CTRL+I) and in Console Window type:$("#inspector_frame").css('height','500px'); this will enlarge the Awesomium Inspector window and you can close the Chrome inspector itself after this. :)

10|1100 characters needed characters left

smartech .. when i follow your process it shows me in firefox a webpage saying "All systems online.To get started inspecting WebViews, click one of the links to the left." but there was not any active websession.... i am using webcontorl i am doing something like this.

  private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
             //ReInitializeWebKitControl();
             WebConfig webC = new WebConfig();
             webC.RemoteDebuggingPort = 12345;
             webC.RemoteDebuggingHost = "127.0.0.1";
             WebCore.Initialize(webC);
         
         Awesomium.Core.WebPreferences webPreferences1 = new Awesomium.Core.WebPreferences(true);
         this.wb = new Awesomium.Windows.Forms.WebControl(this.components);
         this.webSessionProvider1 = new Awesomium.Windows.Forms.WebSessionProvider(this.components);
         this.SuspendLayout();
         // 
         // wb
         // 
         this.wb.Dock = System.Windows.Forms.DockStyle.Fill;
         this.wb.Location = new System.Drawing.Point(0, 0);
         this.wb.Size = new System.Drawing.Size(1284, 1006);
         this.wb.SynchronousMessageTimeout = 0;
         this.wb.TabIndex = 0;
         this.wb.ViewType = Awesomium.Core.WebViewType.Offscreen;
         // 
         // webSessionProvider1
         // 
         webPreferences1.CustomCSS = "::-webkit-scrollbar { visibility: hidden; }";
         webPreferences1.WebAudio = false;
 

            this.webSessionProvider1.Preferences = webPreferences1;
             this.webSessionProvider1.Views.Add(this.wb);
 }

 
answered Oct 04, 2014 at 11:22 AM avatar image sm.abdullah 0
more ▼
(comments are locked)
avatar image sjoerd222888 Apr 07, 2015 at 04:28 PM

Use Chrome. I think remote Debugging only works with Chrome.

10|1100 characters needed characters left

but the javascript console.log not appearing in inspector,, how to fix it?

answered Oct 05, 2014 at 12:39 PM avatar image nnttoo 0
more ▼
(comments are locked)
avatar image Perikles C. Stephanidis ♦♦ Oct 08, 2014 at 06:21 PM

Handle the `ConsoleMessage` event. This is where JavaScript console messages are currently propagated.

10|1100 characters needed characters left
 using System.Diagnostics;
 ....
 private void Awesomium_Windows_Forms_WebControl_ConsoleMessage(object sender, ConsoleMessageEventArgs e)
 {
    Debug.Print("{0} at {1}: {2} at '{3}'", e.EventName, e.LineNumber, e.Message, e.Source);
 }
answered Jan 28, 2015 at 06:22 AM avatar image aztack 0
more ▼
(comments are locked)
10|1100 characters needed characters left

That´s don´t work for me. I´m working in c# project with an awesomium control. I can´t show the console.log() from JS in awesomium inspector console. Anyone can help me please? Thanks

answered Jan 19, 2016 at 11:47 AM avatar image Voro 0
more ▼
(comments are locked)
10|1100 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.