$\newcommand{\R}{\mathbb{R}}$ $\newcommand{\N}{\mathbb{N}}$ $\newcommand{\set}[2]{ \left\{ #1 \,\middle|\, #2 \right\} }$ $\newcommand{\P}{\operatorname{\mathbb{P}}}$ $\newcommand{\E}{\operatorname{\mathbb{E}}}$ $\newcommand{\mcF}{\operatorname{\mathcal{F}}}$ $\newcommand{\abs}[1]{\left|#1\right|}$ $\newcommand{\wrap}[1]{ \left\{ #1 \right\} }$
Suppose we have a stochastic process $X=\wrap{X_t}_{t\in\R_+}$, not guaranteed to be continuous.
Define $T=\sup\set{t\in\R_+}{\forall s< t\,\, X_s\in B}$, where $B\in\mathcal{B}(\overline{\R})$ and let $\mcF$ be the natural filtration on $X$.
This exit time seems like a stopping time because it seems: $$ \wrap{T\le t}=\bigcup_{s\le t}\wrap{X_s\not\in B}\in\mcF_t $$
Yet that last statement doesn't look convincing. It's an uncountable union, so the fact that for all $s<t$, $\wrap{X_s\not\in B}\in\mcF_t$ isn't quite enough to conclude the union is in $\mcF_t$.
Sure, if $X$ was continuous, it'd be uniformly so on $[0,t]$, letting us discretize that union and complete the proof. But without continuity it seems like something is missing. On the other hand, $\mcF_t=\sigma\wrap{X_s}_{s\le t}$, so how can it be that the aforementioned union isn't in the algebra?
If $(X_t)_{t \geq 0}$ is not continuous (or at least càdlàg), then $T$ is, in general, not a stopping time.
Consider $\Omega=(0,1)$ endowed with the Lebesgue measure and let $A \subseteq (0,1)$ be a set which is not a Borel set. If we define
$$X_t(\omega) := \begin{cases} 1, & t=\omega, \omega \in A, \\ 0 , & \text{otherwise} \end{cases}$$
then each $X_t$ is measurable with respect to the Borel-$\sigma$-algebra and therefore $$\sigma(X_s; s \leq t) \subseteq \mathcal{B}((0,1))$$ for any $t \geq 0$. For $$T:= \sup\{t; \forall s <t: X_s = 0\} = \inf\{t; X_t = 1\}$$ we have $$\{T \leq 1\} = A \notin \mathcal{B}((0,1)),$$ hence, $\{T \leq 1\} \notin \sigma(X_s; s \leq 1)$. This shows that $T$ is not a stopping time.