summaryrefslogtreecommitdiff
path: root/python3
diff options
context:
space:
mode:
authorIke Devolder <ike.devolder@gmail.com>2020-03-29 10:27:10 +0200
committerGitHub <noreply@github.com>2020-03-29 10:27:10 +0200
commit694917accd8b2ddeb57fdac8481e9eb5463f9c01 (patch)
treefbd417bbd5f6d3ac0510b393959774138815955d /python3
parent016679bc2edb9300d84e69c44dfa6bd9a13de1eb (diff)
parent4b12452a35d7d7bbf824765015333cab3143fe52 (diff)
downloadvdebug-694917accd8b2ddeb57fdac8481e9eb5463f9c01.zip
Merge pull request #441 from aerostone/fix-win
fix log and breakpoint miss hit on win os
Diffstat (limited to 'python3')
-rw-r--r--python3/vdebug/log.py4
-rw-r--r--python3/vdebug/util.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/python3/vdebug/log.py b/python3/vdebug/log.py
index 5dadea3..7db9a5f 100644
--- a/python3/vdebug/log.py
+++ b/python3/vdebug/log.py
@@ -81,7 +81,7 @@ class FileLogger(Logger):
def __open(self):
try:
- self.f = open(self.filename, 'w')
+ self.f = open(self.filename, 'w', encoding='utf-8')
except IOError as e:
raise error.LogError("Invalid file name '%s' for log file: %s"
% (self.filename, e))
@@ -104,6 +104,8 @@ class Log:
loggers = {}
+
+
def __init__(self, string, level=Logger.INFO):
Log.log(string, level)
diff --git a/python3/vdebug/util.py b/python3/vdebug/util.py
index 4332e7e..09bf48f 100644
--- a/python3/vdebug/util.py
+++ b/python3/vdebug/util.py
@@ -278,7 +278,8 @@ class FilePath:
return self.local
def as_remote(self):
- return self.remote
+ # on win os backslash will cost breakpoint miss hit
+ return self.remote.replace('\\', '/') if self.is_win else self.remote
@staticmethod
def _findSeparator(path):