Va. Code Ann. § 19.2-186
The judge shall discharge the accused if he considers that there is not sufficient cause for charging him with the offense.
If a judge considers that there is sufficient cause only to charge the accused with an offense which the judge has jurisdiction to try, then he shall try the accused for such offense and convict him if he deems him guilty and pass judgment upon him in accordance with law just as if the accused had first been brought before him on a warrant charging him with such offense.
If a judge considers that there is sufficient cause to charge the accused with an offense that he does not have jurisdiction to try then he shall certify the case to the appropriate court having jurisdiction and shall commit the accused to jail or let him to bail pursuant to the provisions of Article 1 (§ 19.2-119 et seq.) of Chapter 9. However, a judge may, for an offense that he does not have jurisdiction to try and with the consent of the accused and the attorney for the Commonwealth, delay a proceeding under this section in order for the accused to complete a specialty docket established pursuant to § 18.2-254.2 or a behavioral health docket established pursuant to § 18.2-254.3. However, if the accused fails to complete such specialty docket or behavioral health docket, the court shall proceed pursuant to § 19.2-183 and this section.
Code 1950, § 19.1-106; 1960, c. 366; 1968, c. 639; 1973, c. 485; 1975, c. 495; 1999, cc. 829, 846; 2026, c. 580.