Skip to content

Message "failed to highlight code" in every step after @enter #303

@adediego

Description

@adediego

I get this message when using @enter in a fresh julia environment (Debugger v0.7.0, Julia 1.7.1 on Fedora 35):

julia> using Debugger
julia> @enter sin(1)
failed to highlight code, TypeError(Symbol("keyword argument"), :bold, Union{Nothing, Bool}, :nothing)
failed to highlight code, TypeError(Symbol("keyword argument"), :bold, Union{Nothing, Bool}, :nothing)
In sin(x) at math.jl:1218
 1218  @eval function ($f)(x::Real)
>1219      xf = float(x)
 1220      x === xf && throw(MethodError($f, (x,)))
 1221      return ($f)(xf)
 1222  end

About to run: (float)(1)
1|debug> 

The message disappeared when I changed all appearances of :nothing to nothing in Format.render at line 201 of printing.jl, but I only had a very superficial look on the code so I'm not sure if that would be the right fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions