rollbar-flutter icon indicating copy to clipboard operation
rollbar-flutter copied to clipboard

Stack trace context

Open mgalgs opened this issue 1 year ago • 4 comments

Do I need to do anything to be able to see context (local variables, etc) in my Flutter stack traces? Currently it always says No context to show!

image

This is how I'm initializing Rollbar in my app:

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  PackageInfo packageInfo = await PackageInfo.fromPlatform();

  var config = Config(
    accessToken: '...',
    package: '...',
    codeVersion: packageInfo.version,
    handleUncaughtErrors: true,
    includePlatformLogs: true,
  );

  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );

  await RollbarFlutter.run(config, () => runApp(MyApp()));
}

mgalgs avatar Apr 05 '24 17:04 mgalgs

@mgalgs How do you add the stack trace and request section using this package?

DeviceApplocum avatar Sep 12 '24 08:09 DeviceApplocum

@DeviceApplocum the above code is my entire initialization for rollbar

mgalgs avatar Sep 12 '24 16:09 mgalgs

Hi @mgalgs, how are you handling the API requests? I’m not getting the request URL in Rollbar

DeviceApplocum avatar Sep 13 '24 10:09 DeviceApplocum

Not sure which API requests you're referring to? I have handleUncaughtErrors set to true, so errors are reported automatically. But you can also add explicit logging using the rollbar library as per the docs.

mgalgs avatar Sep 13 '24 17:09 mgalgs