1

I'm using Xdebug in VSCode on Windows 10.

When I debug PHP source using Xdebug, Character Encoding for Exception Message is weird. My Source File Encoding is UTF-8, and php.ini configuration is also UTF-8.

I don't know why Xdebug emits Exception message broken encoding. I attached some screenshot for Exception Message, first one is VSCode Exception Message and the other is error log in PHP.

I think origin message is "잘못된 사용자 id" in second image. For some reason, VSCode or Xdebug can't interpret Korean.

Where's this problem coming from?

exception

exception

I checked character encoding in php.ini, it's UTF-8. And source code file encoding is also UTF-8.

Origin exception message is in Korean. And VSCode or Xdebug can't interpret Korean, so I think one of these can't interpret Korean or UTF-8.

Is there any options to set character encoding in VSCode or Xdebug?

2
  • 1
    1) You have asked the same before, 25 days ago: stackoverflow.com/questions/78860275/… Commented Sep 6, 2024 at 12:13
  • 1
    2) I'd enable Xdebug log ( xdebug.org/docs/all_settings#log ), try to debug to reproduce the issue and check the log -- see what encoding it uses there (you might need to force the UTF-8 encoding for a file). If it's OK there -- it might be VSCode then... I would then suggest to contact the Xdebug VSCode extension author about this (he/she should know more about it) Commented Sep 6, 2024 at 12:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.