LoginSignup
3
0

More than 1 year has passed since last update.

UnityDebugger for VSCode ウォッチ式で他のクラスが覗けない

Last updated at Posted at 2019-03-25

TL;DR

仕様です。私みたいに時間を無駄にする前に諦めましょう。

「global名前空間エイリアス(global::)」から記述することで可能です。

example
> System.Math.PI
Evaluate request failed (Unknown identifier: System). .........NG

> global::System.Math.PI
3.1415926535 ..................................................OK

できないこと

UnityDebugger for VSCodeをセットアップして、適当なブレークポイントで引っかける
デバッグコンソール、ウォッチ式、ログポイント、条件付きブレークポイントにおいて次のような式はエラーになる

* クラス名を含む
* ブレークポイントのあるクラス以外のクラスでの拡張メソッド

要するに、使えるのは以下のものしかない

* ローカルスコープ
* ブレークポイントのあるクラスのプロパティ
* リテラル

staticシングルトンとかにもアクセスできない。

> this
{Cube (HogeBehaviour)} ........................................OK

> 9 * 4
36 ............................................................OK

> System.Math.PI
Evaluate request failed (Unknown identifier: System). .........NG

UnityEngine.Vector3.zero
Evaluate request failed (Unknown identifier: UnityEngine). ....NG

補足

開発者も困っているみたいです。

Known issues and missing features
* LINQ expressions are not validated from debugger-console or the watch list.
https://forum.unity.com/threads/unity-debugger-extension-for-visual-studio-code-2-0-x-preview-release.526263/

2018/10に最新の言及がありますがやっぱりダメそう…

miniwolf_unity (Unity Technologies)

~~Yeah, no. It is not fixed. Me and another user, verified that it is still broken. But awesome that you are keeping me up-to date with this, I would never have spotted this myself. ~~

VisualStudioやMonoDeveloperなら可能だけど、VSCodeに比べるとかなり重く、ポータビリティもイマイチ…

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0