% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/source-context.R
\name{pv_source_context}
\alias{pv_source_context}
\title{Show source context for a specific location}
\usage{
pv_source_context(x, filename, linenum = NULL, context = 10)
}
\arguments{
\item{x}{A profvis object.}

\item{filename}{The source file to examine.}

\item{linenum}{The line number to center on. If \code{NULL}, shows the hottest
line in the file.}

\item{context}{Number of lines to show before and after.}
}
\value{
Invisibly returns a \code{debrief_source_context} object. Use
\code{capture.output()} to capture the formatted text output.
}
\description{
Displays source code around a specific file and line number with profiling
information for each line.
}
\examples{
p <- pv_example()
pv_source_context(p, "R/main.R", linenum = 10)
}
