Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-1058

-compile([debug_info]). has no effect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 23.0
    • Fix Version/s: OTP-23.0-rc2
    • Component/s: compiler, debugger
    • Labels:
      None

      Description

      The statement "-compile([debug_info])." in an erlang file does not seem to have any effect. I have only tested this with the master branch (commit 91851e286082b271299fb8d332492430cf084902) but other versions seems to be affected as well. The following text (copied from https://stackoverflow.com/questions/21198092/) describes how to reproduce the bug:

      From https://stackoverflow.com/questions/21198092 :

      
      After overcoming some troubles with installation I tried to use erlang debugger on simple module:
      
      I included -compile([debug_info]). option in source file and compiled with:
      
      1> c(test_module).
      
      This did not work as expected: After running
      
      2> debugger:start().
      
      the monitor window appeared, then I clicked
      
      Module->Interpret...->test_module.erl
      
      and got error
      
      "Error when interpreting: test_module.erl: No debug_info in BEAM file".
      
      Deleting -compile([debug_info]). line and changing
      
      1> c(test_module).
      
      to
      
      1> c(test_module, [debug_info]).
      
      solved the problem.
      
      What is the difference between these two ways of setting compilation option, why one works and the other does not?
      

        Attachments

          Activity

            People

            Assignee:
            john John Högberg
            Reporter:
            kjell Kjell Winblad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: