Debugger getting confused - any suggestions?

G

Griff

Hi - I have completely rebuilt my PC from scratch and it's running XPsp2 and
VS2003 sp1.

Sometimes when I run my ASP code (this is CLASSIC asp by the way) through
the VS2003 debugger, I get the following error message (the following is an
example):
---------------
Microsoft VBScript compilation (0x800A0408)
Invalid Character
/x/x/x/specificPage.asp, line yyy, column z
abc[]ef = hijk
---------------
- the [] is supposed to represent a square box used to display a non-ASCII
character.

However, the SAVED code line in question is:
abcdef = hij.

To get rid of this problem, I have to re-start IIS and re-start the
debugging process. It usually then falls over on a later line with the same
error message.

As you can imagine, it's a little frustrating, but can't think how best to
go about fixing the problem. Any suggestions would be appreciated (By the
way, this combination of IIS, VS2003 & Classic ASP has worked well for about
2 years now so it's not that they're inheriently incompatible).

Griff
 
B

Bob Barrows [MVP]

Griff said:
Hi - I have completely rebuilt my PC from scratch and it's running
XPsp2 and VS2003 sp1.

Sometimes when I run my ASP code (this is CLASSIC asp by the way)
through the VS2003 debugger, I get the following error message (the
following is an example):
---------------
Microsoft VBScript compilation (0x800A0408)
Invalid Character
/x/x/x/specificPage.asp, line yyy, column z
abc[]ef = hijk

This has happened to me when I've edited a file in a different editor that
saved the file in unicode format. It has also happened when I've pasted text
that contained unicode characters into an asp file and saved it. The only
way I've ever been able to prevent it is to make sure VS never saves a file
in unicode (it does prompt me when unicode characters are encountered). When
the error occurs, I wind up having to retype the affected portion to get rid
of the unicode character(s).
However, the SAVED code line in question is:
abcdef = hij.

Yes, that's what it looks like in the text editor. However, you can rest
assured that there is a unicode character in there.
 
A

Anthony Jones

Griff said:
Hi - I have completely rebuilt my PC from scratch and it's running XPsp2 and
VS2003 sp1.

Sometimes when I run my ASP code (this is CLASSIC asp by the way) through
the VS2003 debugger, I get the following error message (the following is an
example):
---------------
Microsoft VBScript compilation (0x800A0408)
Invalid Character
/x/x/x/specificPage.asp, line yyy, column z
abc[]ef = hijk
---------------
- the [] is supposed to represent a square box used to display a non-ASCII
character.

However, the SAVED code line in question is:
abcdef = hij.

To get rid of this problem, I have to re-start IIS and re-start the
debugging process. It usually then falls over on a later line with the same
error message.

As you can imagine, it's a little frustrating, but can't think how best to
go about fixing the problem. Any suggestions would be appreciated (By the
way, this combination of IIS, VS2003 & Classic ASP has worked well for about
2 years now so it's not that they're inheriently incompatible).

This is unlikely to have anything to do with VS2003 it isn't responsible for
the VBScript parser complaining about an invalid character.

Open the ASP file in question and goto File|Save As... what encoding does
does it think the file is using?

Does the page contain a <%@codepage directive? If so what is it?

Can you give a real example of the error instead of the pretend one you've
given?

The only possible relationship to VS2003 is that it may be saving the files
as UTF-8 instead of an OEM codepage but without a <%@codepage directive (not
recommended in this case unless applied globally to all pages) this could be
confusing the parser.
 
G

Griff

However, you can rest assured that there is a unicode character in there.

Hi Bob

I'm not sure that is the case though...

The file is often one that hasn't been edited for some weeks. It would have
the ReadOnly property set to TRUE. Restarting IIS then results in the file
being correctly parsed without any change to the file on disc.

Griff
 
G

Griff

Hi Anthony

Answers below each specific question. Also please refer to my reply to Bob
Barrows
Open the ASP file in question and goto File|Save As... what encoding does
does it think the file is using?

I opened the text file using Notepad and the encoding was ANSI
Does the page contain a <%@codepage directive? If so what is it?

It does not contain a code page directive.
Can you give a real example of the error instead of the pretend one you've
given?

Okay - in the property below the m_Menu1Colour was changed to
m_Menu[]Colour:

Public Property Let Menu1Colour(ByVal sValue)
m_Menu1Colour = sValue
End Property
The only possible relationship to VS2003 is that it may be saving the
files
as UTF-8 instead of an OEM codepage but without a <%@codepage directive
(not
recommended in this case unless applied globally to all pages) this could
be
confusing the parser.

Unfortunately I find no evidence that it is anything other than ANSI
 
G

Griff

Nathan

I took your advice and yup - I had a memory problem. Memory duly swapped
and no sign of a problem, so thanks.

One thing to note - before booting from the ISO image you recommended, I
first downloaded a memory tester that works within Windows (obviously not as
thorough but quicker if it identifies the problem) from
http://hcidesign.com/memtest/ . It so happened that this identified the
memory problem immediately, so a bit of a short cut....

Griff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top