Hi,
I'm using Visual Studio 7 (.NET 2003) to debug JS code and find that code
that was written into a script block dynamically doesn't show up. Whenever
any of that code executes, there's no source to go with it. I suspect this
is
because it wasn't loaded into the browser directly from a .JS file, so it
doesn't know where it's from.
There's an inconsistency though. If I have a block of code (in a string) and
I eval it into existence, then in "running documents" I see "eval code" and
it
the source code is accessible and can be stepped thru from there. I can set
breakpoints in any code I eval'ed into existence and step thru it no
problem.
If, however, I brought that code into existence by creating a script
element, adding the string block of code into the .text property, and then
using insertAdjacentElement or .appendChild, then I don't see it anywhere.
Any attempt to set breakpoints or step thru any of that code and I just get
"no source code available".
It's not that the code isn't working, it's just a pain if I have a bug.
~dd