This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 156559 - I18N - Source encoding and debugger
Summary: I18N - Source encoding and debugger
Status: RESOLVED FIXED
Alias: None
Product: python
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 blocker (vote)
Assignee: jymen
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2009-01-11 00:31 UTC by grudolf
Modified: 2009-02-19 22:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description grudolf 2009-01-11 00:31:37 UTC
The debugger often fails with error:

---
>[LOG]PythonDebugger : overall Starting
[LOG]PythonDebugger.taskStarted : I am Starting a new Debugging Session ...
[LOG]This window is an interactive debugging context aware Python Shell 
[LOG]where you can enter python console commands while debugging 
['Traceback (most recent call last):
', '  File "C:\\Users\\grr\\.netbeans\\6.5\\config\
bPython\\debug\
bpythondebug\\jpydaemon.py", line 393, in dealWithDebug
    self.run(\'execfile(\' + `fullname` + \')\')
', '  File "C:\\Python25\\Lib\\bdb.py", line 366, in run
    exec cmd in globals, locals
', '  File "<string>", line 1, in <module>
', '  File "C:\\DEV\\vbscan\
bprj\\hello.py", line 2
', 'SyntaxError: encoding problem: with BOM (hello.py, line 1)
']
c:\users\grr\.netbeans\6.5\config\nbpython\debug\nbpythondebug\jpydaemon.py
args =  ['C:\\Users\\grr\\.netbeans\\6.5\\config\\nbPython\\debug\\nbpythondebug\\jpydaemon.py', 'localhost', '29100']
localDebuggee= None
JPyDbg connecting  localhost  on port  29100
JPyDbgI0001 : connected to  localhost
'+++ JPy/sessionended/
deamon ended

Debug session normal end
---

The code causing the error is:

# -*- coding: cp1250 -*-
print "Hello World"

Removing the line, disabling the coding instruction (by changing it into cAAAoding) or changing coding to utf-8 fixes
the error and debugging starts normally. Sometimes the first start is successful but the following runs fail even if the
source wasn't changed at all. The normal run works fine, debugging in Eclipse or PythonWin works fine too.

NetBeans 6.5 v1.2.2, Python plugin v0.100, Python 2.5.2
Comment 1 jymen 2009-01-13 10:58:49 UTC
fixed on trunk starting with hudson build #595 and above