开发者

What is causing the creation of a transient script document?

开发者 https://www.devze.com 2023-04-02 22:34 出处:网络
I am using an application that uses javascript based client side and server side code. I can debug the client side code successfully using a \"debugger\" statement. Code is viewed in Visual Studio 20

I am using an application that uses javascript based client side and server side code. I can debug the client side code successfully using a "debugger" statement. Code is viewed in Visual Studio 2005. However when I debug the server side code using a "debugger" statement, the following events happen:

  1. VS opens with "inetinfo (Running)" in the title bar but no code displayed
  2. a blank text document is created in my text editor (Notepad++) - C:\Windows\System32\^TransientScriptDocument0.txt
  3. Returning to VS I get a Find file dialog box titled "Find Source: JScript - script block" or "eval code". It is looking at the folder inetsrv for a filename of "JScript - script block" or "eval code".
  4. I cancel this dialog as the file is not present.
  5. I get another VS dialog box stating "There is no source code available at the current location"
  6. I click "OK" on this dialog box and I can see the VS main window with no code displayed. My locals windows shows the local variables available at the breakpoint and I can view the functions in the "Call Stack" although if I try to click on them to debug I once again get the dialog box "There is no source code available at the current location".

Can someone please explain: 1. What is happening 2. What I need to change to be able to view and debug the server side source code in the same manner as I can with the client side source code开发者_如何转开发 Many thanks


It's difficult to say without knowing the application, but in general a debugger against compiled code - which I think is likely true of the server side code in your case - doesn't trace against the source code directly but against the debug information included in the object code (this is the difference between debug and release code - release code doesn't have this extraneous information).

This debugger then links back to a copy of the source code file to show you the current line being executed and let you view the contents of the variables. But this is 'smoke and mirrors', it's not actually running the code directly you see.

So in your case what's probably happening is that in your environment the debugger doesn't actually know where the source is, or can't open it (i.e. permissions). Your next step is therefore to check your development environment and make sure that everything is pointing to the correct location and all necessary read permissions have been granted.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号