How can I get the debug message from the Dll component in the javascript?? RRS feed

  • Question

  • From the "Media plugins sample", I try to plugin my own dll in JavaScript and I find that there are no output messages on the output window. How can I get the message from the dll??. By the way, it can get message on the UI with C++.
    Thursday, October 20, 2011 2:56 AM

All replies

  • You can using WinDbg to attach to your process(WWAHost.exe), then you can see your message of the dll.

    You can find windebug for Win 8 in





    Thursday, October 20, 2011 9:34 AM
  • VS11 was unable to attach the WWAHost.exe(low-previlege) somehow.

    Is there a simple way to debug that dll from VS11?


    Tuesday, December 6, 2011 4:35 PM
  • Hey all,

    You cannot attach VS to WWAHost.exe and debug javascript.  The javascript has been compiled at this point.  Look for a solution to allow this scenario later however!  For now you could do it old school and write out debugging statments to a file (something I had to do once).


    Jeff Sanders (MSFT)
    Tuesday, December 6, 2011 7:37 PM
  • Update: Here is how you can debug a background JS process. I used the BackgroundTask sample to try this out since it was easier for me to repro. Steps, 1. In the Solution Explorer, right click on the BackgroundTaskSample project 2. Choose Properties 3. Click the Debug nav tab on the left side 4. Check the box "Do not launch, but debug my code when it starts 5. Repeat steps 1-4 except for the BackgroundTask project 6. Hit the Save All Icon 7. Set a bp in the background task I chose the top of the Run() function 8. Hit F5 to start debugging (note that the project does not start your app, but it says debugging. 9. Launch your app from the Start screen by hitting the tile or typing the name of the app 10. Register by hitting the Register button and kick off the background task by unplugging and reconnecting your network cable in this case). 11. You will hit the BP! -Jeff
    Jeff Sanders (MSFT)
    Wednesday, December 7, 2011 2:29 PM
  • Jeff, thanks for posting. You suggestion is not working for me, nor Cpp Dlls.

    Btw, "Do not launch, but debug my code when it starts" option does not apply to BackgroundTaskSample project. I assume you meant "Debugging->Launch Application"=No, rite?


    Wednesday, December 7, 2011 6:59 PM
  • AH!  I see so your C++ component is hosted in the WWA application correct?

    You should be able to use VS still.  Once the app is running and your component is loaded, then choose Debug, Attach to process.  Change the Attach to: using the Select... button and choose Native and unselect the other options.  Then you should be able to debug your C++ code.


    Jeff Sanders (MSFT)
    Wednesday, December 7, 2011 7:41 PM
  • Dear jpsanders:

    When I release the application as package and installed, I still need a way to see my debug message for error resolving. So if I write the OutputDebugString() to output my debug message in my dll, how can I get the output message without VS11. I don't have the module of the application. Is Windbg is the only way for it or there is a application like Debugview able to solve this problem??


    Tuesday, December 20, 2011 3:12 AM
  • You can use sysinternals dbgview for seeing OutputDebugString messages.


    Tuesday, December 20, 2011 11:32 AM