Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
472 views
in Technique[技术] by (71.8m points)

c++ - Debugging a unity c# project on the hololens

I have an additional question to this one regarding debugging on the HoloLens.

I have four consecutive scenes in my app. In the last scene an infrared marker is tracked. This works just fine, but I wanted to implement a better template matching and there is a bug in it. My problem now is, how to debug this.

When I build the Visual Studio Project from Unity all script code is written to Assembly-CSharp.cpp. I guess this is the translation to cpp. All original c# code is included as comment, e.g.:

// MathNet.Numerics.LinearAlgebra.Matrix<float> edges_template = MathNet.Numerics.LinearAlgebra.Matrix<float>.Build.Dense(num_temp, num_temp, (i, j) => 0);
        IL2CPP_RUNTIME_CLASS_INIT(Matrix_1_t569A96D357516B5575C33026AD201DCA864DAED7_il2cpp_TypeInfo_var);
        MatrixBuilder_1_tBFDBEC998748FA18487498A347A8476ADB4BDA65 * L_2 = ((Matrix_1_t569A96D357516B5575C33026AD201DCA864DAED7_StaticFields*)il2cpp_codegen_static_fields_for(Matrix_1_t569A96D357516B5575C33026AD201DCA864DAED7_il2cpp_TypeInfo_var))->get_Build_2();
        int32_t L_3 = V_0;
        int32_t L_4 = V_0;

I think no one mentioned this before, which is a little bit confusing to me right now.

Where do I set the Breakpoints? In the Assembly-CSharp.cpp-file or the original script? One of the answers state that first debugging must be started after the newly generated VS project is compiled. So it starts on the HoloLens.

When I then open another VS instance over Edit Script in Unity and use Debug-> Attach Unity Debugger, is the code also executed on the HoloLens? Do I need to be in the same scene on the HoloLens?

Can someone provide more details here? The last scene depends on actions done in the preovious scenes, like the position of another marker, etc.

Thanks


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...