Is there a non-decreasing function that is discontinuous at every rational point? A well-known theorem is that if $f:[a,b]\to\mathbb{R}$ is non-decreasing, then $f$ as at most countably many discontinuities. This led me think of the following question.

Question: Is there a non-decreasing function $f:[0,1]\to\mathbb{R}$ such that $f$ is discontinuous at every rational point?

Such a function would definitively be geometrically counter-intuitive. Intuitively, I would think that if it is discontinues at every rational point, then it will be discontinues everywhere, and hence would not exist by the aforementioned theorem. But I cannot think of any proof or disproof of these claims.
 A: Suppose we have a counting on the rational points. Associate every rational point with a natural number "n". Now we associate every rational point with a value: 2^-n. The function at any "point" will be the sum of the values of all the rational points to the left of it.
A: The following is a bit more general than your question, because I think others can handle your actual question better.
You made the intuitive observation that if a function is discontinuous at every rational then somehow it should be discontinuous everywhere. This intuition is not quite correct, because it is possible for the set of discontinuity points of a function to be a dense proper subset of the space. Thomae's "popcorn function", whose set of continuity points is exactly the irrationals, is a well-known example.
A general fact which holds in any complete metric space (maybe any metric space, but I don't want to deal with details) is that the set of continuity points of a function is a $G_\delta$ set, meaning that it is a countable intersection of open sets. In $\mathbb{R}$ we have a converse statement: for any $G_\delta$ set $A$ there is a function whose continuity set is exactly equal to $A$. And as it happens, there are proper subsets of $\mathbb{R}$ which are dense $G_\delta$ sets; probably the simplest example is the irrational numbers.
However, it is impossible for the set of continuity points of a function to be exactly $\mathbb{Q}$. That is, if the continuity set contains $\mathbb{Q}$ then actually it is larger than just $\mathbb{Q}$. This follows from the Baire category theorem, as follows. Write $\mathbb{R} \setminus \mathbb{Q}$ as a countable intersection of dense open sets $A_n$ (for instance $\bigcap_{n=1}^\infty \mathbb{R} \setminus \{ q_n \}$ where $q_n$ is an enumeration of the rationals). By way of contradiction write $\mathbb{Q}$ as a countable intersection of dense open sets $B_n$. By the Baire category theorem, $\emptyset = \left (\bigcap_{n=1}^\infty A_n \right ) \cap \left ( \bigcap_{n=1}^\infty B_n \right ) = \bigcap_{n=1}^\infty A_n \cap B_n$ is dense in $\mathbb{R}$ which is a contradiction.
