Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeInitializationException in iOS #133

Open
futahei opened this issue Jun 9, 2018 · 0 comments
Open

TypeInitializationException in iOS #133

futahei opened this issue Jun 9, 2018 · 0 comments

Comments

@futahei
Copy link

futahei commented Jun 9, 2018

I use jurassic in Unity for iOS App.
When I build my project and try app, I got TypeInitializationException.

System.TypeInitializationException: The type initializer for 'Jurassic.Compiler.ReflectionHelpers' threw an exception.
 ---> System.InvalidOperationException: The static method System.Diagnostics.Debugger.Break() does not exist.

So I rewrite this code.

// Jurassic/Compiler/Emit/ReflectionHelpers.cs 230 line

// Debugger_Break = GetStaticMethod(typeof(System.Diagnotics.Debugger), "Break");
if(System.Diagnostics.Debugger.IsAttached) {
  Debugger_Break = GetStaticMethod(typeof(System.Diagnostics.Debugger), "Break");
}

Is this code safe ?
I didn't get error after chage code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant